Snaver.net

Display Geo location Map on Page Load Geolocation WordPress Plugin

I recently installed the Geolocation WordPress Plugin on one of my private blogs to allow me to Geotag my posts with a location from wherever I might have been at the time of posting. The main feature that really stood out for me was the ability to Geotag posts using the WordPress iOS app, when writing a post from my iPhone I could Geo tag that post accurately using my phones built in GPS capabilities.

However I wasn’t entirely happy with the way that the maps were being displayed, in the current version 0.1.1 you have to hover over the the text description of the location, like below and the map will then popup on your mousehover.

Wordpress Geolocation Map Before

I’ve changed the code of the plugin to show the map on page load, which for my use works better than the mouse over. I code is pretty hacky but it works, perhaps I could extend the plugin at a later date to allow an option to be selected in the admin on which functionality you prefer, depends on the feedback I receive from this I suppose.

Wordpress Geolocation Map After

To enable this on your own WordPress installation simply download the files below and drag them into the geolocation plugin folder, obviously remove the .txt extensions from the file names and replace the corresponding files within that directory. If this plugin is updated (Currently these modifications are for version 0.1.1) the files attached here wont be compatible as the code would have changed.

Download

style.css geolocation.php

Update (30/04/2011)

I’ve added a few options to this plugin and also moved the code over to my own github repo which you can view here https://github.com/Snaver/Geolocation, a few of the changes are:

Exit mobile version