1

I have implemented a method that draw the route between 2 points, but the route is off the road. How can I draw the route only in road?

coordinateArray[0] = CLLocationCoordinate2DMake(appDelegate.latitude, appDelegate.longitude);
coordinateArray[1] = CLLocationCoordinate2DMake(appDelegate.latitude2, appDelegate.longitude2); 

self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:2];
[self.myMapView setVisibleMapRect:[self.routeLine boundingMapRect]]; 
[self.myMapView addOverlay:self.routeLine];
Ladessa
  • 985
  • 4
  • 24
  • 50

1 Answers1

0

This was very helpful ((: MKPolyline with Google Maps API https://github.com/Surya121/SBMapWithRoute

Ladessa
  • 985
  • 4
  • 24
  • 50