Hi Readers!
Below is the code to launch the Apple Maps application and display the directions between 2 points on Map.
Example 1: Display directions
-
MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(42.313432,-71.057157) addressDictionary:nil];
-
MKMapItem *item = [[MKMapItem alloc] initWithPlacemark:placemark];
-
item.name = @"Boston";
-
-
MKPlacemark *placemark1 = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(35.843871,-78.645056) addressDictionary:nil];
-
MKMapItem *item1 = [[MKMapItem alloc] initWithPlacemark:placemark1];
-
item1.name = @"Raleigh";
Read full Blog Here>> How to launch Apple Maps from iOS app
|