I was wondering how I can open Google Maps from my iphone app so that Google Maps shows the route when you arrive at the web page?
Today I use code that only shows the coordinate.
NSString *latlong = [NSString stringWithString: @"59.33267,18.07361"];
NSURL *url = [[[NSURL alloc] initWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?ll=%@", [latlong stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ]] autorelease];
[[UIApplication sharedApplication] openURL:url];
Important: You can't start navigation if you don't use your current location, but you can still get a preview of the route. Search for your destination or tap it on the map.
While following driving, cycling, and walking directions in the Maps app , you can get an overview of your route and a list of upcoming turns.
Use the following format for url (you must specify both route start and endpoint):
"http://maps.google.com/maps?daddr=%f,%f&saddr=%f,%f"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With