Question

I have a node called Dealer that has the following CCK fields;
Title
Body
Location (of type Location)
Phone (of type text)
Website ( of type text)
Divsion (Node Refrence)

Is there a way to display the location of the node on a gmap, based on the inputted location? I'll be importing around 1000 nodes, and don't have the co-ordinates for any of these, but only have the address of each.

Was it helpful?

Solution

What you are looking for is two features: geocoding of Location data and a (Google) map display of the result. Usually Geocoding is done at node creation time, or using some kind of cron job. While map display is done on node view (teaser, full page, views, etc.).

Both features should be provided by the Gmap project's modules. The OpenLayers and OpenLayers Geocoder projects should also provide them. Finally the Google Map Tools may be a third alternative.

All projects provide some kind of Views integration that allow you to build map(s) for your nodes using familiar tools.

For geocoding (and storage) of the coordinates, there is also the Geo and Geocode projects. But it seems Geocode doesn't support Location fields.

OTHER TIPS

You can use the following two modules.

http://drupal.org/project/openlayers

drupal.org/project/openlayers_geocoder

It can geocode your address and you can use google maps to show it. Not sure if this combination of modules will work with programatically created nodes but it is a start.

I implemented geocoding using the location (drupal.org/project/location) and gmap (drupal.org/project/gmap) modules. You need "node location" and "location search" submodules activated, and set up your geocoding options in admin/settings/location/geocoding , offering a way to bulk geocode the existing Dealers too.

You won't need the Location CCK field, just use the setup provided by "node location" (edit your Dealer content type).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top