Discuss [Maps] Sample Code for Launching it with parameters? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Sorry in advance if I've overlooked something, but haven't been able to find anything yet...
[Maps] Sample Code for Launching it with parameters?
Sorry in advance if I've overlooked something, but haven't been able to find anything yet...
Working on a stupid little app locally, and have Lattitude/Longitude coordinates, and would like to pass them off to Maps.app to plot. But I can't seem to find any information about passing parameters to Maps.app...
I know its being done somehow (used in plenty of the ever-popular fake-GPS apps - Navizon and the like), but can't find any mention of how...
Anyone have some sample snippets, or a point in the right direction?
You need to edit the com.apple.Maps.plist in the preferences folder:
Originally Posted by impactdni
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<real>put your latitude here</real>
<real>put your longitude here</real>
Then restart the maps.app.
Hope this help, PmgR
============================================= Help stop the persecution of Falun Dafa in China!
Stop organ harvesting from living people in China's labor camps http://www.faluninfo.net http://www.theepochtimes.com/211,111,,1.html
Falun Dafa, an ancient Chinese self-cultivation practice,
based on the principles of * Truthfulness * Compassion * Tolerance * http://www.falundafa.org
It would be cleaner to construct an NSURL that points to e.g.
and pass that to UIApplication's openURL method as per http://www.tuaw.com/2007/08/28/iphon...-url-launcher/
This should be less susceptible to future changes to the Maps application.
Just try openURL with the following:
it can be
drops you in the middle of the Isere river .
EDIT: you can also directly query for directions:
maps:saddr=<my starting address>&daddr=<my destination address>
You separate words with "+", i.e.:
Last edited by gusano; 02-19-2008 at 01:26 PM.
By hackint0sh in forum Latest Headlines
Last Post: 09-01-2011, 09:00 PM
By supersuraccoon in forum iPhone Developer Exchange
Last Post: 04-25-2011, 02:51 PM
By Rello in forum Free Toolchain Software (Cydia App's)
Last Post: 07-28-2008, 10:03 PM
By lowbelly in forum iPhone Developer Exchange
Last Post: 04-25-2008, 12:46 AM