0

In my app using latitude and longitude values dropped the pins.so,i need to get the direction between those 2 pins in iOSMaps App.Is that possible to show the direction between 2 pins in iOS MapsApp.

Pavne
  • 89
  • 8
  • 1
    Have a look at http://stackoverflow.com/questions/12636707/how-can-i-get-direction-on-an-iphone-ios-6-app-in-xcode-from-a-to-b. I'd focus on the answer given by Roland Keesom. – fguchelaar Feb 18 '13 at 09:54

1 Answers1

0

yes you can do this. Please have a Look at

http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html

You can pass two location via URL Scheme to the apple map app.

Try

- (IBAction)getTest:(id)sender {
   [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino"]];
}

It should open the maps app and show the path between San Francisco and Cupertino.

It should also work with coordinates, but you have to find out yourself ;)

Hope it helps.

Retterdesdialogs
  • 3,180
  • 1
  • 21
  • 42