-2
我如何显示内置的谷歌地图上的导航选项iOS的源和目的地和导航与语音或我必须实现谷歌地图API?谷歌地图导航选项为ios
我如何显示内置的谷歌地图上的导航选项iOS的源和目的地和导航与语音或我必须实现谷歌地图API?谷歌地图导航选项为ios
你可以使用下面的代码;它会显示带有放置注释的选定位置;从谷歌应用程序,你可以浏览
https://developers.google.com/maps/documentation/ios-sdk/urlscheme
if ([[UIApplication sharedApplication] canOpenURL:[NSURL
URLWithString:@"comgooglemaps://"]])
{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"comgooglemaps://?center=%f,%f&q=%f,%f",mosqueLocation.latitude,mosqueLocation.longitude, mosqueLocation.latitude,mosqueLocation.longitude]];
[[UIApplication sharedApplication] openURL:url];
} else {
NSLog(@"Can't use comgooglemaps://");
}