I’m a big fan of the WP Geo plugin, but I want more.
My biggest complaint is that I want to insert coordinates using Google Maps or MultiMap URLs, rather than insert them in the modified story editor. So I wrote a bit of code that reads through the URLs in a post, finds the “maps.google” or “multimap.com” URLs, fishes the latitude and longitude out of them, and adds some geocoding tags to the body of the post.
Take a look at how it works with these posts in my archive…
You should see one or more blocks of links like the following (from my Osceola Weekend post):
Go ahead and click the “geobloggers” link. I could have added these links using the old Geo plugin, but I still would have had to insert the coordinates separately. Actually, that brings up a good point: my code also inserts post metadata in the same format the Geo plugin uses, so I can take advantage of all the good functions it has, like the one that inserts the “<meta name=“ICBM” content=“44.006336, -71.547260” />” tag in the header of this post (caveat: I had to disable the add_action code in Geo that feeds the postmeta table, as it was conflicting my code).
I’m releasing this now, to start some public discussion, but please recognize that it’s a very early beta.
Install: place unzipped “bsuite_geocode.php” file in your wp-content/plugins folder and activate it via the WP control panel. See the WordPress Codex for more detail.
Use: write posts as usual, adding links to Google Maps or MultiMap as appropriate. Links to those sites that have latitude and longitude components will be used to geocode the post.
Example of a working URL:
Example of a URL that won’t work (note how there’s no “ll=”):
I’ve got a lot of features and uses in mind, so consider this only a start. Please post bugs and suggestions in the comments.