I want to draw a route from point A to point B on my mapView
(GMSMapView
).
I've tried to do it like this:
GMSMutablePath *path=[GMSMutablePath path];
[path addCoordinate:self.locationManager.location.coordinate];
[path addCoordinate:marker.position];
GMSPolyline *rectangle=[GMSPolyline polylineWithPath:path];
rectangle.strokeWidth=2.f;
rectangle.map=self.mapView;
But it just drew a line that connects point A to point B but not the route itself (the directions through streets, roads etc...).
I want to draw on the map the best way to get to point B from point A by walking.
How can I do that?
Thank you!