2016-08-24 103 views

回答

0

你可以使用下面的代码;它会显示带有放置注释的选定位置;从谷歌应用程序,你可以浏览

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