idea: googlemap drupal module hack

A friend pointed me to the googlemap drupal module.

I installed this module on terrorware.com and its pretty cool, but I’ve had some problems.

This module is cool, but currently limited – or rather limited by the location module.

The googlemap (gmap) module gets data about the event from longitude and lattitude tags in the rss feed for nodes with location information enabled.

I was only able to get this info added to the feed if I specified a zip for the location address. This makes sense as the documentation for the location module seems to suggest that it looks up longitude and lattitude based on postal code info.

When I did this, the gmap loaded my points, but showed up incorrectly on the map. I assume that this was due to incorrectly calculated longitude and lattitude on the part of the location module. I confirmed this by looking at the feed for the node at http://www.terrorware.com/?q=node/76. It showed:

39.131576
-86.497430

The mapping feature of the location module just calls up google maps with a url generated from the addresss. In this case, it’s http://maps.google.com/?q=325+S.+Walnut+Street%2C+Bloomington%2C+IN%2C+47401%2C+us. If you look at the source of the google page, you’ll notice that they have their calculated longitude and lattitude info included:

Not the same!

Looking at the google source does, however, provide the means for hacking the location module to more accurately detect lng./lat. You could just have it grep the info from the page generated by google! The advantages of this would be greater accuracy and eliminate the need to enter a postcode.