Tag Archives: maps

Displaying route with iOS Maps application

To easily display a route between two locations with the built-in Maps app (iOS 4 is recommended for multitasking), insert the following code into your app:
NSString* url = [NSString stringWithFormat: @"http://maps.google.com/maps?saddr=Current\%20Location&daddr=%f,%f", destCoordinate.latitude, destCoordinate.longitude];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

Source: Stackoverflow.com