我正在使用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