我正在使用Apple Maps API編寫應用程序。我想按照Google服務的查詢指示(https://developers.google.com/maps/documentation/directions/?hl=vi)顯示用戶和朋友路線。從服務中獲取數據後,我使用MKPolyline(iOS SDK中的類)在Apple地圖上顯示路線。這是可能的,而不是與蘋果和谷歌的政策衝突?是否可以將Apple Direction API與Apple Maps一起使用?
期待您的回覆。
感謝
我正在使用Apple Maps API編寫應用程序。我想按照Google服務的查詢指示(https://developers.google.com/maps/documentation/directions/?hl=vi)顯示用戶和朋友路線。從服務中獲取數據後,我使用MKPolyline(iOS SDK中的類)在Apple地圖上顯示路線。這是可能的,而不是與蘋果和谷歌的政策衝突?是否可以將Apple Direction API與Apple Maps一起使用?
期待您的回覆。
感謝
是,可以使用谷歌API的方向與蘋果地圖...在iOS6的下面的示例代碼試試這個希望你有幫助...
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake([_iLat doubleValue],[_iLong doubleValue]);
//create MKMapItem out of coordinates
MKPlacemark* placeMark = [[MKPlacemark alloc] initWithCoordinate:coordinate addressDictionary:nil];
MKMapItem* destination = [[MKMapItem alloc] initWithPlacemark:placeMark];
if([destination respondsToSelector:@selector(openInMapsWithLaunchOptions:)])
{
//using iOS6 native maps app
[destination openInMapsWithLaunchOptions:@{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving}];
}
你可以嘗試新的谷歌地圖SDK iOS版:
那麼這對我來說是個壞消息:-( – haisergeant
那麼,有沒有爲方向API的任何替代方案? – haisergeant
MapQuest的有方向的API – jmstone617