How to Invoke iPhone Maps for Directions with Current Location as Start Address

Posted by eriaac on Stack Overflow See other posts from Stack Overflow or by eriaac
Published on 2009-02-23T07:11:15Z Indexed on 2010/05/26 23:41 UTC
Read the original article Hit count: 266

Filed under:
|
|

Hi all.

I know it's possible to start the iPhone maps application by calling openURL on a google maps URL with parameters saddr and daddr with location strings or LatLong (see ex. below), but I'm wondering if it's possible to make the start address be the "Current Location" maps bookmark so that I can use the maps app's location handling code. My Google search has been pretty fruitless.

ex:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@", myLatLong, latlong]]];

Except with something to invoke the current location bookmark in place of myLatLong.

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk