一行代码集成苹果地图/百度地图/高德地图/谷歌地图/腾讯地图导航功能。跳转地图App,无需集成响应地图的SDK。
手机上需要安装了A地图,actionSheet列表中才会出现A地图。
通过url scheme携带坐标数据跳转地图App实现
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
}];
1.先在Info.plist中注册白名单
<key>LSApplicationQueriesSchemes</key>
<array>
<string>qqmap</string>
<string>comgooglemaps</string>
<string>iosamap</string>
<string>baidumap</string>
</array>
2.项目中调用
// 提供GCJ国测局坐标
CLLocationCoordinate2D gcjCoor = CLLocationCoordinate2DMake(30.180876, 120.158472);
[[MapNaviTool sharedInstance] startMapNavi:gcjCoor];

