Google Maps Tools

The successor of the gcg project by the original contributor.

Key features:

  • CCK based
  • Complete views integration, including proximity searches
  • Token integration
  • Custom location taxonomy (requires the taxonomy module to be enabled)
  • DHTML menu integration
  • Preconfigurable maps
  • Preconfigurable icons: built-in from the gmap project and Google charts based factory icons
  • Completely new Geocoder result parser
  • Completely separated, cacheable static maps

The most popular question: What is this project? What is it good for? Why to reimplement the gmap project?

This project is a clean-up and/or rewrite from scratch of the Mapadelic subsystem, not only the gmap project.

You can use this project for the same purposes as Mapadelic. Of course, this is a much more younger project, so there are features not yet implemented by this project (but will be).

Before this project I tried to use Mapadelic as anyone else. This project is the result of the test.

The second most popular question: What is the difference between gmaps and Mapadelic (and not only gmap as you know now)?

The key difference is the concept, or in other words, the way these projects implement the same feature. Every concrete difference comes from this basic one.

A few examples:

  • gmaps deals with spacial data through form elements, not through included "subforms"
  • gmaps extends node types using CCK fields, not custom form alters
  • gmaps adds content to map views using view fields, not custom hooks
  • gmaps follows well-known solutions like node type admin, core CCK field implementations, views, etc. In other words, gmaps tries to be as Drupal-like as possible

Development plan:

Port to D6. Hopefully, it will be available in January, 2009.

Planned features:

  • Custom icons
  • Taxonomy based icon configurations
  • Implement all overlay types: polyline, polygon....
  • Support all map (API) features
  • etc

Mini HOWTOs

HOWTO: build a map?

  1. create a map config
  2. add a coordinate enabled gmaps field to a node type (all except plain address)
  3. submit content of this type
  4. create a "Google Maps View" styles view, add one of the map overlay fields to the view (one of: node link marker, node teaser marker, field list marker, content marker)

HOWTO: use the taxonomy feature

  • gmaps has a custom location taxonomy implementation, because regular taxonomy integration makes impossible to implement important features.
  • Location taxonomy has only one logical vocabulary: locations. (Nowhere accessible, do not try to find it........)
  • Location terms are automatically generated and come from the submitted address values.
  • So, the feature is only a taxonomy-like node listing callback at "taxonomy/location".

NOTE: the argument structure of the callback will be changed to conform to the views argument stucture!

Usage:

  1. add an address enabled gmaps field to a node type (all except map point and map marker), and enable the "Display location terms" feature of the field.
  2. submit content of this type
  3. enable the taxonomy module (theme_node calls directly taxonomy_links, if exists)

HOWTO: build a location navigation block

  1. add an address enabled gmaps field to a node type.
  2. submit content of this type
  3. enable the location menu feature at "admin/settings/gmaps"
  4. create a new menu
  5. move the "Content by location" menu item to the new menu and disable it
  6. enable the block of this menu

HOWTO: report a geocoder result parser bug

First try to search for the address at "admin/help/gmaps-debug". There is a textarea below the field, which will contain the source of the returned JSON object after the search.
If the content of the field doesn't match the source, that is a bug. If you report any bug, please report the address, too.

Known geocoder mistakes:

  • In not enough Googled countries, the geocoder can return the administrative area value in the subadministrative area field, and can return the locality value in the dependent locality field, etc
  • The postal code is known for a given house number, but unknown for another in the same street
  • For some addresses the geocoder returns only one result typically from the US, but if you're looking for that address in an other country try to use the "Restrict search to selected country" feature.

Please do not report geocoder bugs for me, but directly to the Google team at Google Maps API bug reports and feature requests.

Project state

The project is ready to use, but not ready to contribute. There's no documentation, because most of the code needs review, at least for performance reasons, and there are lot of coming soon changes (for example full API support). By my plans, the 6.x-1.0 release will be the first contributable, documented release, but this can change according to the requests.

IMPORTANT NOTE!!

Map based field formatters (both static a dynamic) format the entire field for the first value and following values have an empty string as formatted value. This is because all content must be added to the map in the same time. This behavior can cause problems because CCK calls twice the formatters, if more than one field has any value, and uses the second output, which is just an empty string for map formatted gmaps fields. You can solve this problem by weighting the field to be the lightest CCK field or display it in a CCK block.

Releases

Official releasesDateSizeLinksStatus
5.x-1.32009-Feb-24136.27 KBRecommended for 5.xThis is currently the recommended release for 5.x.
Development snapshotsDateSizeLinksStatus
6.x-2.x-dev2009-Oct-31455.14 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.


 
 

Drupal is a registered trademark of Dries Buytaert.