1

I'm unable get the Walking directions using Apple Map app, But if use MKLaunchOptionsDirectionsModeDriving rather than MKLaunchOptionsDirectionsModeWalking the code works, can someone please help a bit getting on Walking directions?

I have following code for getting directions, which is working for Driving case...

MKPlacemark* place = [[MKPlacemark alloc] initWithCoordinate:_targetLocation addressDictionary:nil];
MKMapItem* destination = [[MKMapItem alloc] initWithPlacemark:place];
destination.name = [lastParkingInfo streetAddress];
NSArray* items = [[NSArray alloc] initWithObjects: destination, nil];
NSDictionary* options = [[NSDictionary alloc] initWithObjectsAndKeys:MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsDirectionsModeKey, nil];
[MKMapItem openMapsWithItems:items launchOptions:options];
Zee
  • 1,865
  • 21
  • 42
  • 1
    Do you get any errors, warnings etc...? – WDUK Jan 29 '13 at 10:26
  • NO errors or Warning in my code, but Apple Map App display alert like "Could not found directions between these locations" – Zee Jan 29 '13 at 13:16
  • 1
    Have you tried doing it manually yourself in Maps? It may be a genuine case that it can't figure out pedestrian directions due to the road layout. – WDUK Jan 29 '13 at 14:07
  • Yes I did tried manually and it works. But doesn't when Maps App is invoked from My App, fails every time. – Zee Jan 30 '13 at 09:51
  • 1
    use the google map for direction there are a no. of code available for route. – Mike Jun 06 '13 at 06:07

0 Answers0