Комментировать
Drupal Google maps. I choose the Simplest gmap
The common task is:
- add location to a node by pointing it on the google map, highly desirable with cck field
- create maps with groups of node on one map with views.
I worked with GMap and location,
I saw at the newer module Google Maps Tools as well,
but when I've found Simplest gmap module I understood that is really what I need.
The main advantages of this module in my opinion:
- really very simple and small
- that is a CCK field
- perfect map widget
(when you drop a marker, it doesn't zoom in as other modules)
There are no any requirements for this module.
There is a one weakness of this field - there are no way to add location
by typing city, country and so on, only by dropping marker.
Views
And what about views integration?
Maintainer says that he is going to do that,
but even now we have such possibility!
- Download and enable modules:
- Computed field
- Mapstraction - for views map style
Of course - Simplest gmap and Views as well.
- Then create content type with three fields:
- field of type Simplest gmap
- Longitude field of computed type
- Latitude field of computed type
- Configure computed fields:
Write in the Computed code textarea of your Longitude and Latitude fields:
$node_field[0]['value'] = $node->field_geolocation[0]['longitude'];$node_field[0]['value'] = $node->field_geolocation[0]['latitude '];respectively,
where field_geolocation - name of your simplest gmap field - Add new view,
add longitude and latitude fields,
for style choose - Mapstraction
And now you have a big map with nodes on it :)


