1

I am incorporate Google Maps V2 in my project and I am trying to get the driving direction between the two positions:

List<Position> RouteCoordinates = new List<Position>();
RouteCoordinates.Add(new Position(37.7850268, -122.4005109));
RouteCoordinates.Add(new Position(37.780624, -122.390541));

var polylineOptions = new PolylineOptions();
polylineOptions.InvokeColor(0x66FF0000);

foreach (var position in RouteCoordinates)
{
    polylineOptions.Add(new LatLng(position.Latitude, position.Longitude));

    MarkerOptions marker = new MarkerOptions();
    marker.SetPosition(new LatLng(position.Latitude, position.Longitude));
    gmap.AddMarker(marker);
}

gmap.AddPolyline(polylineOptions);

But this draws a straight line between the two points... Is there any method to get the driving directions between these two points?

Mohammad Akbari
  • 4,486
  • 6
  • 43
  • 74
  • 1
    http://stackoverflow.com/questions/37189634/api-google-maps-doesnt-return-enough-of-step/37191234#37191234 – SushiHangover Apr 18 '17 at 03:23
  • 1
    http://stackoverflow.com/questions/17425499/how-to-draw-interactive-polyline-on-route-google-maps-v2-android – Hobbit Apr 18 '17 at 03:25

0 Answers0