我正在嘗試使用Google地圖獲取方向。 我下面這個鏈接 https://developers.google.com/maps/documentation/ios-sdk/urlscheme?hl=en帶有URL方案的Google地圖?
和代碼:
if ([[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:@"comgooglemaps://"]]) {
NSString *[email protected]"comgooglemaps://?saddr=Google+Inc,+8th+Avenue,+New+York,+NY&daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&directionsmode=transit";
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:temp]];
} else {
NSLog(@"Can't use comgooglemaps://");
}
地圖沒有打開,我得到:
Installation[2918:1295695] -canOpenURL: failed for URL: "comgooglemaps://" - error: "(null)"
是什麼問題?我錯過了什麼?
我想從我的應用程序顯示谷歌地圖。從這裏取
我已經在此處提到過了https://developers.google.com/maps/documentation/ios-sdk/start – karthikeyan