How to draw path from one location to other in that location is get from web services in ios?
Asked
Active
Viewed 105 times
-4
-
how to want to draw path form ur current location to destination place or how u want give some clear details – Shanthanu Jun 20 '14 at 07:25
-
post you code you have tried & explain where you have problem. – Pawan Rai Jun 20 '14 at 07:43
1 Answers
0
You can draw lines between two locations using below code. You need to pass saddr(Source address) cordinates and daddr(destination address) coordinates
NSString *googleMapUrlString = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%f,%f&daddr=%@,%@", mapView.userLocation.coordinate.latitude, mapView.userLocation.coordinate.longitude, destinationLatitude, destinationLongtitude];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapUrlString]];
But it will redirect to Safari Browser..
Hope it helps you..

Vidhyanand
- 5,369
- 4
- 26
- 59