Geo Mark WordPress Plugin

Geo Mark WordPress Plugin

Geo Mark is a WordPress Plugin which will automatically locate Geo information in your WordPress posts using Yahoo Placemaker and YQL API’s.

Once the Geo location is located, it will add this information as custom fields to the post. The information stored in the custom field can be displayed anywhere in the post using the build in get_post_meta() function. The Plugin also exposes template functions which can be used to generate GEO Microformats based on the location information found in the post.

The Geo Mark Plugin also lets you to expose the location based information in RSS feeds. The Geo information stored in the custom field can be used to create Geo tags in the RSS feed. The Plugin supports the following Geo RSS formats.

  • Simple (georss:point)
  • GML (gml:pos)
  • W3C (geo:lat)

Download

You can download the Plugin as a zip file from the official WordPress Plugin repository.

Installation

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

Screenshot

geo-mark-wordpress-plugin

Usage

Template Function

The geo information stored in the custom fields can be exposed as GEO Microformats by calling the following template function, anywhere within the Loop.

get_geo_info(get_the_ID());

Enabling Geo RSS

To enable Geo RSS, go to settings –> Geo Mark and check the “Enable GeoRSS tags in feed” option. You can also choose which format of Geo RSS that you want to support.

Translation

The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.

Feedback

If you have any comments or if you want to report any bugs, please leave a comment below or contact me.

Stay updated

I would be posting updates about this Plugin in my blog and in Twitter. If you want to be informed when new version of this Plugin is released, then you can either subscribe to this blog’s RSS feed or follow me in Twitter.

Credits

Thanks to Chris for the Geo This Greasemonkey script and to Yahoo Placemarker and YQL for powerful yet easy to use API’s

Changelog

  • 2009-07-07 – v0.1 – Initial Release
  • 2009-07-21 – v0.2 – Fixed issue in handling empty arrays
  • 2009-07-22 – v0.3 – Added support for translation.
  • 2009-08-15 – v0.4 – Fixed a small typo.
  • 2009-08-18 – v0.5 – Removed hard coded Plugin path and some bug fixes.
  • 2010-01-02 – v0.6 – Added Belorussian translation.

Share thy love

8 Comments so far

Trackback URI | Follow up comments through RSS Feed | Post a comment

  • Anonymous says:

    Great article, adding it to my bookmarks!

  • sunshine says:

    Awesome job !!! keep it up.

  • Peter says:

    hi Sudar,

    In my sidebar, I want to automatically log where I made the last post . Is this achievable with your plugin?

    An example of how to use it for the millions who use wordpress but not PHP would be great.

    thanks,
    Peter

    • Sudar says:

      @Peter,

      Right now it not possible out of the box. But this seems to be a valid usecase. I will add it to my todo list and will implement this feature when I get some free time.

  • Hello. Can I retroactively apply this to the posts that already exist on the blog? Or will it only apply to posts created after this is installed?

    • Sudar says:

      Right now you can apply it only to posts that are created after the Plugin is installed. It will also work if you edit the old posts after installing the Plugin.

  • Kris says:

    This is definitely something I’m interested in using for one of my sites.

    At the moment, I’ve previously manually added the lat/long as my own custom fields per post (I can handle any migration of that). For this plugin, does the user get to enter the lat/long if they choose, or is it something that’s detected by the user’s machine via WiFi, etc.? It wasn’t clear to me from the overview (sorry).

    I like the GeoRSS feed feature, too, which I wanted to use for displaying posts on a Google Map using the existing site feed.

    For what it’s worth, you can check out what I have now over at http://www.mauibyphoto.com – click on one of the photos on the home page and you’ll see what my posts look like. There currently is a Google Map Image (using their static image API) that shows the location of each post. If I could utilize this plugin for storing the location details, displaying the name via Yahoo’s API, and the GeoRSS feed, I could implement a shortcode for the static map image on my own and would be happy to send that code back to you if you’d like.

    Also, I have another blog that’s a photography portfolio that references photos on Flickr that are geotagged. I’m already using the Flickr API to pull in EXIF data, so I could definitely see doing something with this, too, to show location and a map of where the photo was taken.

    Great work here, and looking forward to your thoughts.

    - Kris

17 Trackbacks/Pingbacks so far

Leave a Comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">