views:

739

answers:

1

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.

+2  A: 

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).

Will Harris
Thank you Will,for a detailed and focused answer.Nir.
Tiger