The Apple Developer Documentation (link is dead now) explains that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as standard with the iPhone will launch.
How can I launch the same Google Maps application with a specific address from within my own native iPhone application (i.e. not a web page through Mobile Safari) in the same way that tapping an address in Contacts launches the map?
NOTE: THIS ONLY WORKS ON THE DEVICE ITSELF. NOT IN THE SIMULATOR.
For iOS 5.1.1 and lower, use the
openURLmethod ofUIApplication. It will perform the normal iPhone magical URL reinterpretation. soshould invoke the Google maps app.
From iOS 6, you’ll be invoking Apple’s own Maps app. For this, configure an
MKMapItemobject with the location you want to display, and then send it theopenInMapsWithLaunchOptionsmessage. To start at the current location, try:You’ll need to be linked against MapKit for this (and it will prompt for location access, I believe).