Question

I have been searching all around about how to integrate driving directions into MKMapView within my application. Is the only way to open the Apple Maps program and go from there, or is their a way of integrating within your own app. If not, I will probably go with google maps as soon as I can get an API key.

Was it helpful?

Solution

If you mean getting the same views for driving direction (a.k.a. turn-by-turn navigation) as the Apple Maps application, then no... as far as I know, there is no library for that (if not 3rd party). However, as you mentioned, you can open apple maps or google maps giving the directions to the application and initiate such a function.

Also, good to know: If there would be such a build-in functionality in iOS6 (which, again I don't believe there is) its good to know it doesn't exist in pre-iOS6. Meaning it won't work on earlier devices. (hence you need to build a fall-back solution if you want to support those devices as well).

More information on iOS turn-by-turn: http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS6.html

Quote from that page (which makes me believe turn-by-turn is not supported in the API's):

... Apps that offer routing information, such as turn-by-turn navigation services, can now register as a routing app and make those services available to the entire system.

The documentation search page doesn't give much more info either: http://developer.apple.com/library/ios/search/?q=turn-by-turn

For more information on how to open the maps app, check the answer here: https://stackoverflow.com/a/12789896/406677

So bottom line, you need to either create your own turn-by-turn navigation... or link to an existing application giving such support.

I hope that answered your question.

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