Advanced Google Maps in Drupal

Jan 22, 2010
Cesar Salazar

Drupal is a great CMS and Google Maps is a great service, and there are some modules for Drupal that allow us to connect them in a simple and easy way. This is perfect if you just want for example create content related to a location and display it in a map. If you want to do more than just that, continue reading.

If you use the Location module and the GMap module, you can also connect your content using Views (Which is just another great module for Drupal). Using Views with Location and Gmap is a great combination. You can use it for example to search content based on the location, and display it in a map. You could expose filters to search within a given range of miles from a point, items related to a state, etc.

If you want your system to be connected with "real" GIS data, you can take a look to Geo and Geocode modules

The problem is when you want to implement other more advanced displaying features, that aren't included in those modules, for example:

-          Display selectable polygons instead of just markers

For example, you want a user to select given areas in your map, and then display information related to that area in an information bubble or in a new page.

-          Display selectable lines

A very specific case could be for example if you want a river to be selectable and then display information about that river.

-          Other advanced displaying options

An example that comes to my mind is for example if you want to display information in different layers over a map, and you want the user to hide or display layers using checkboxes.

Doing some research we found that the first problem is partially solved using some patches (Thanks to German for his research on this). One patch is for allowing Location module to include more than one marker in a map, and the other one is for Gmap module and allows displaying the markers as a polygon in a gmap view. These patches can be found at Drupal community website: and

The problem with these patches is that they aren't stable yet, so we have to wait.

I've been doing some research on how to solve these problems but I haven't found an already built solution, so I will have to start designing one, maybe (just maybe) based on the patches mentioned above.

If I can get some free time, I would like to create a module for integrating Mapfish (, an easy-to-use and extensible web 2.0 mapping application framework, into Drupal. Mapfish would be great to implement advanced displaying options in your maps, and if we connect it to Geo, Geocode, Gmap, and Location modules, it will be just great.

I'll keep you posted.