Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Replace the phone book widget's mapping service - Like this...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Replace the phone book widget's mapping service - Like this...
Authored by: unixrocks on Apr 30, '05 09:26:52PM

I messed with this and got it working but it is ugly.

Addressbook widget uses compiled code - so you need to fire up a hexeditor to get this to work. I used HexEdit which I think is just a great hex editor.

/Library/Widgets/Address Book.wdgt/AddressBook.widgetplugin/Contents/MacOS/AddressBook

is the binary in question.

Back it up - and I personally copied it to the desktop as root and edited it there and then copied it back again - just easier then messing with permissions in the program directory. Use overwrite mode in HexEdit - its easier.


Find the following string:

http://www.mapquest.com/maps/map.adp?country=%@&address=%@&city=%@&state=%@&zip=%@

and replace it with:

http://maps.google.com/maps?q=%@+%@+%@+%@+%@++++++++++++++++++++++++++++++++++++++

No room for error here - your replacement string has to be exactly the same length as your origional string or it wont work - the program will just crash or some other nonsense.

Google ignores the extra +++++ signs so it works put it looks a little odd with a large browser window or a short address.

Save the file in hexedit, copy it back to the origional directory and you have to remove addressbook from dashboard and then bring it up again (command-R wont work with this one)

If someone has a neater and cooler way of doing this I would love to learn (keep thinking I could use xxd here but so far I just keep clobbering the file when I try. =-)





[ Reply to This | # ]
10.4: Replace the phone book widget's mapping service - Like this...
Authored by: pediddle on May 01, '05 04:33:02PM

Google doesn't always understand the country code, and it seems to need commas separating address, city, and state, so here's string that might work better for some addresses. Note that Google ignores the "country=..." parameter altogether, so if you want directions outside of the US, this probably won't work...

<tt>http://maps.google.com/maps?country=%@&q=%@,+%@,+%@+%@&bogus=+++++++++++++++++++++</tt>

This also hides the extra spaces in a bogus field and should be exactly the length required.



[ Reply to This | # ]
10.4: Replace the phone book widget's mapping service - Like this...
Authored by: milesgehm on May 01, '05 05:05:30PM

This worked. Thanks.



[ Reply to This | # ]