2016-08-24 93 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://"); 
}