Question

I am writing an application using Apple Maps API. I would like to display user and friend route, by query direction from Google service here (https://developers.google.com/maps/documentation/directions/?hl=vi). After I get data from service, I use MKPolyline (class in iOS SDK) to display route on Apple Maps. Is that possible and not conflict with Apple and Google policy?

Looking forward your response.

Thanks

Was it helpful?

Solution

IIRC, Google's Maps API terms expressly forbid using their data services with somebody else's maps.


Update: In iOS 7 and later, MapKit has APIs for getting directions (and rendering the resulting routes). See MKDirections and related docs.

OTHER TIPS

You could try the new Google Maps SDK for iOS:

https://developers.google.com/maps/documentation/ios/

yes, is possible to use google direction api with apple Maps...in IOS6 below sample code try this hope your helpfull...

    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}];

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top