Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the URL scheme for the iOS 6.0 maps app?

Previously, within an iOS app you could launch the Maps app from within your application by using the Google Maps URL scheme (http:maps.google.whatever.whatever).

Does anyone know what the new URL scheme for the iOS 6.0 Maps app is? I can't find any new documentation on this.

like image 783
Steve Lobdell Avatar asked Aug 27 '12 21:08

Steve Lobdell


1 Answers

You need to use MKMapItem to open the maps application. Take a look at the documentation: Documentation

Here's how to use it:

MKMapItem *mapItem=[[MKMapItem alloc] initWithPlacemark:yourPlacemark];
[mapItem openInMapsWithLaunchOptions:@{MKLaunchOptionsMapTypeKey : @(yourMapType), MKLaunchOptionsShowsTrafficKey : @(yourTraffic), MKLaunchOptionsDirectionsModeKey : yourDirectionMode}];
like image 124
J2theC Avatar answered Oct 24 '22 21:10

J2theC