0
votes

Did I understand correctly:

Opening google maps from my App demands closing that App in order to display google maps App? e.g doing so: NSString* urlString = @"http://maps.google.com/maps?saddr=London+UK&daddr=Birmingham+UK"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString: urlString]];

will close my App?

So how can I display a driving track between two points using the map kit?

Thanks-

Nir.

1

1 Answers

3
votes

MapKit does not give directions. I think this is because of the licence agreement between Google and their map data providers.

The easiest way to show directions is indeed to open the map URL. You understand correctly, this will close your app and open the Maps application. Closing your app to show Maps may be the right thing to do from your users' points of view.

If you must have directions on your map without leaving your application, you'll have to build it yourself. You could render the route as one or more annotations with custom views. Unfortunately, your app will have to find the route information on its own (or use a third party library).