-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://");
}