WordPress Gmaps Library

Google Map Logo

Google Map Logo

This plugin is an experiment to manage huge collection of google map marker. Actually I don’t work on the plugin because WordPress 3 is going to add the possibility to create “custom page type” which I need to make the plugin way more efficient !

Problem

Let’s say that you want to register all the lake in the world and put your results on a WordPress Website. It is a long work, and there is a lot of them, in every country, region, …

You want to display a map with a marker for each of them, but at the same time you wants to allow your visitor filter them by several criteria, like geographic area or characteristic.

Moreover, for each Google Map Marker you want to associate a blog post.

Finally, you don’t want to deal with Google Map, you just want to copy and paste the URL of lake in Google Map in a form and the marker will be ad automatically, screenshot of the aerial view also add automatically, …

My Solution

I wrote this plugin to try to solve this problem. My solution isn’t perfect and need a lot of improvement and work just to answer every aspect of it.

You can see a demo of the plugin on this page http://energies2demain.com/eau/hydraulique/les-barrages-vus-du-ciel/ . The view is ugly and there is no “global” map but it is working.

<h1>What is Behind ? </h1>

Let’s put some screenshot and their description.

Navigation

WPGML - example of naviguation

WPGML - example of navigation

Here you have a representation of the navigation through geographic area. At the top it is a navigation bar to go back in the “tree”. The number represent how many items are in each sub-categories.
At the moment no global map is display :( .

Item selection

item selection

item selection

Last screen before an item is selected. Each item is a link to the corresponding post.
Notice the wonderful color of the arrow : it is an attempt to give options to the administrator to customize the display of everything !

Item View

item view

item view

The item is a post. I hide it from the first page of the blog by setting the creation date way far in time. It is bad an ugly, but it is the only solution I found. I need a clean URL for SEO, and I can’t use a page because it is going to destroy every menu. So posts were the only way to do it. But with custom page type in WordPress 3, I will have a better solution.

The item display an array with the information that you give when you create an item and a “screenshot” from Google Maps.

New item

Create a New Item

Create a New Item

When you create a new item, there is only few necessary information to give.
You first select the kind of item, then the view is update with the necessary fields you need to fulfill. The name, the URL and the “collection” need to be fulfill. A default item type have only these fields. The administrator choose to add more information in the “item type” menu.
If several collection are associate with one item type, you have to link the object in a leaf of the each “collection tree”.

In my screenshot, there is only one collection : geographic area. But I could have an other one like material of construction, or year.

When you create the item, a message told you if it succeed. A new post with the right title, date, category  is creating at the same and the screen display a link to edit it directly. Sweet !

View Item List

view item list

view item list

view item list subcat

view item list subcat

I have develop a menu to easily manage items. For each item, you can navigate in the associate collection tree to see which item are associate in every point. You can edit the item content or metadata.

I need to add a function to search a specific item.

Collection Administration

Collection Administration

Collection Administration

In this page you manage your collection : you create them, rename, delete, add leaf or node, … Full ajax, pretty nice to use !

Item Type Administration

Item Type Administration

Item Type Administration

THere you add new item kind and you specify their attributes. You can also re-order the attributes. You also make the association between item type and collections.

Why this plugin is not public ?

Well first it is not done, and WordPress 3 is going to change how is going to work. Next, the administration has a some bugs and need more functionality. Then, it doesn’t display a map when visitors navigate in the item collections. Also it used page template that I have hard code : it need a generator for that.
Then I use Google Maps API v2 and only the static image one. WordPress prevent you to use iframe so I can’t use the embedded snippet. I have to find a way to go through this limitation.
Moreover ….

And finally I don’t really work anymore on it. Too many line of code are crap and need to be rewrite. I would like to do that with a team, to keep it clean and motivate me to improve it !

If you really want to use it or code it, I can give you the code, just send me an email !

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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