Reputation: 1111
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
Upvotes: 0
Views: 1723
Reputation: 126107
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.
Upvotes: 5
Reputation: 17624
You could try the new Google Maps SDK for iOS:
https://developers.google.com/maps/documentation/ios/
Upvotes: 3
Reputation: 869
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}];
}
Upvotes: 1