Iphone 是否可以将Google Direction API与Apple Maps结合使用?

Iphone 是否可以将Google Direction API与Apple Maps结合使用?,iphone,google-maps,maps,directions,Iphone,Google Maps,Maps,Directions,我正在使用Apple Maps API编写一个应用程序。我想显示用户和朋友的路线,从谷歌服务查询方向在这里(https://developers.google.com/maps/documentation/directions/?hl=vi). 从服务中获取数据后,我使用MKPolyline(iOSSDK中的类)在Apple地图上显示路线。这是否可能,且与苹果和谷歌的政策不冲突 期待您的回复 感谢IIRC,谷歌地图API条款明确禁止将其数据服务用于其他人的地图 更新:在iOS 7及更高版本中,

我正在使用Apple Maps API编写一个应用程序。我想显示用户和朋友的路线,从谷歌服务查询方向在这里(https://developers.google.com/maps/documentation/directions/?hl=vi). 从服务中获取数据后,我使用MKPolyline(iOSSDK中的类)在Apple地图上显示路线。这是否可能,且与苹果和谷歌的政策不冲突

期待您的回复


感谢IIRC,谷歌地图API条款明确禁止将其数据服务用于其他人的地图



更新:在iOS 7及更高版本中,MapKit具有获取方向(以及呈现结果路线)的API。请参阅和相关文档

是的,可以将google direction api与apple Maps一起使用…在下面的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}];

}

您可以尝试新的适用于iOS的Google Maps SDK:


那么这对我来说是个坏消息:-(那么方向API还有其他选择吗?MapQuest有一个方向API