Yahoo! Developer Network Blog
« Previous | Main | Next »
June 22, 2009
Adding a Geolocation Button to Wordpress with Greasemonkey, YQL, and Placemaker
Adding geographical information to a text on the Web is a terribly useful thing. For one, you can then display the information on a map and give it visual context. Furthermore, web users are becoming more mobile with the help of laptops, free wireless, and smart phones. Being able to identify relevant geographical location for a document would allow search engines and other websites to match users in a given area or point searchers to a geographically relevant document. Plain text search doesn't quite cut it, as location names can also be names of people or events. Just do a search for "one night in Paris" if you don't believe me.
Geolocating content can be done using several open services - including Yahoo! Placemaker. (If you want a library that uses several services check out Simon Willison's Geocoders.) The issue is that adding geodata to existing content can be quite tedious until you find a nice and easy way to batch-process content.
We need easy-to-use geo lookups when we edit texts-- in other words, before publication. There are plugins for CMS and blogging systems that usually work by showing you a map and setting the location manually. This is too much work for me.
Geo This (also available on GitHub) is a Greasemonkey script for Firefox that ties in with Wordpress installations and shows you a button labelled "geo this" under your editor:
Pressing this button will take the content of the field, send it to Placemaker and return you all the content it finds as GEO microformats. Each of the entries starts with an HTML comment telling you what Placemaker found so you can delete false positives.
I will keep working on this to make it a generic JavaScript that could be added to any form, if there is interest. Contact me on GitHub, add a comment here, or follow the discussion on my personal blog.
Chris Heilmann
Yahoo Developer Network
Posted at June 22, 2009 2:11 PM | Permalink
Comments
Post a comment
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service. Fields marked with asterisk '*' are required.
Subscribe
Recent Blog Articles
view all
YQL Open Table for Google Buzz now live
Tue, 09 Feb 2010
INSERT INTO twitter.status ...
Mon, 08 Feb 2010
Announcing the Yahoo! Brasil Open Hack Day 2010, 20-21 March
Mon, 08 Feb 2010
Marketing hacks, linchpins, and tech women of valor
Sun, 07 Feb 2010
Yahoo! India invites you to join the first India Hadoop Summit
Thu, 04 Feb 2010
Recent Links
Appcelerator Titanium + Yahoo YQL on Vimeo
Mon, 08 Feb 2010
Tue, 02 Feb 2010
PhoneGap | Cross platform mobile framework
Sat, 30 Jan 2010
Web developers can rule the iPad - O'Reilly Radar
Sat, 30 Jan 2010
rc3.org - Is the iPad the harbinger of doom for personal computing?
Thu, 28 Jan 2010
Archives
2010
2009
2008
2007
2006
2005
Recent Readers



