What is the standard / best way to implement a route on an iPhone?

I read about several posts for developers who want to display the route on a map on the iPhone, but there is no satisfactory answer on how to best achieve this. You can use the Route-Me library, add a layer on top of MKMapView or send coordinates to the software to map phones, and then switch from your application, which, in my opinion, is a bad user interface. None of this solves the problem.

Some Post writes that there are legal obstacles; others write that it is about licensing money. This should be a very common requirement and therefore a common function to implement. So what is the de facto standard way to do this?

Can someone with good experience share their thoughts on this?

BR // Kristoffer

+5
source share
1 answer

So, I decided to use Apple Developer technical support to understand this. This is the answer:


Hello,

Thank you for contacting Apple Worldwide Developer Technical Support. I am responsible to inform you that I have received your request for technical assistance.

- - "". , , . . API MKMapView , . -, , lat/long MKMapView. HTTP- API Google Directions. , Google; MKMapView Google, .

http://code.google.com/apis/maps/documentation/directions/#DirectionsRequests

, , Yahoo Google, MKMapView , MKOverlayPathView MKShapes . Apple "KMLViewer",   http://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html , KML. , lat/long.

, "", . , , :

// for lat/long directions
NSString *urlString1 = @"http://maps.google.com/maps?daddr=37.324885,-122.032378&saddr=37.332094,-122.03124";

// for address directions
NSString *urlString2 = @"http://maps.google.com/maps?f=d&source=s_d&saddr=1+Infinite+Loop,+Cupertino,+CA+95014&daddr=Mandarin+Gourmet,+Cupertino,+CA&hl=en&geocode=FcajOQIdYvO5-Ckbd16TtrWPgDFAc4Pi50E92A%3BFZ2GOQIdLe65-CHRv0sTH7YegykLqKn9rbWPgDGUnqKbIqi1Bg&mra=ls&sll=37.325567,-122.032989&sspn=0.007243,0.007285&ie=UTF8&ll=37.328195,-122.031466&spn=0.007243,0.007285&z=17";

[[UIApplication sharedApplication] openURL: [NSURL URLWithString: urlString1]];

:

, Google. Google , Google, MKMapView. , T & Cs Apple , MKMapView. , , .


+3

All Articles