Forum Xamarin Xamarin.Android

To Add Custom Lat Lang with User Current Location on Google Map And Path b/w them


Working on Xamarin.Android app on Visual Studio. I have got the users current location on Google Map. Also I would need to add my custom Lat & Lang values on Google Map with User Current Location. Then I would need to draw a path between UserLocation & Custom Lat&Lang values. How should I do this. kindly suggest the demo if available or any guidance....


  • seanydaseanyda GBMember ✭✭✭✭✭

    If you're using the Google Maps API Nuget, This is how I add a Pin to the Map

    previewLocations.Pins.Add(new Pin { Position = new Position(LAT, LNG), Label = item.pon, Type = PinType.Place, Tag = item.sdn });

    This is how to draw a path.

    Polyline testPolyine = new Polyline();
    testPolyine.Positions.Add(new Position(latitude:, longitude:));

    and then add it to the Polylines in the Map.

  • SumeetKumar.6844SumeetKumar.6844 USMember
    edited November 2017

    I am using GooglePlay Services package for this. In which method should I have to add this code ?

Sign In or Register to comment.