iOS 6.0地图应用的URL方案是什么?

Ste*_*ell 7 mapkit ios ios6 ios6-maps

以前,在iOS应用中,您可以使用Google Maps URL方案(http:maps.google.whatever.whatever)从应用程序中启动Google地图应用.

有谁知道iOS 6.0地图应用程序的新URL方案是什么?我找不到任何关于此的新文档.

J2t*_*heC 2

您需要使用 MKMapItem 打开地图应用程序。看一下文档:文档

使用方法如下:

MKMapItem *mapItem=[[MKMapItem alloc] initWithPlacemark:yourPlacemark];
[mapItem openInMapsWithLaunchOptions:@{MKLaunchOptionsMapTypeKey : @(yourMapType), MKLaunchOptionsShowsTrafficKey : @(yourTraffic), MKLaunchOptionsDirectionsModeKey : yourDirectionMode}];
Run Code Online (Sandbox Code Playgroud)