Not entirely sure how to link to the Advanced Help overall page of a module, so the links below may not work.
Overview
Gmapfield is a CCK module that allows a user to input a GMap Macro, which creates a Google Map on the node, and allows for the placement of markers from Location(s).
CCK Configuration
- Create a new CCK field of type Gmap Field, with widget as GMap Field Text Area.
- Check Add Markers if you want locations to be added to your map.
- Check Choose Marker Type if you want the node-editor to be able to choose the marker type.
- Choose Default Marker Type. Of course, if you are not displaying markers, this field does not matter.
- Choose Coordinate Data Source. Currently only Location (not CCK Location) is supported.
- CCK allows for default values. You can choose the default value for the GMap Macro, but the default value for the marker will be overridden by the Default Marker Type.
Field Usage
- In the node edit form, enter a GMap Macro into the text area of the widget.
- If you have permission, you can choose the marker.
Theming
You can theme the markers that are created in the map. By default, the location theme is used.
/**
* Impelemtation of theme hook
*/
function theme_gmapfield_markerwindow($location = NULL, $node = NULL) {
return theme('location', $location);
}
To override in your template.php file:
/**
* Override gmapfield_markerwindow
*/
function yourtheme_gmapfield_markerwindow($location = NULL, $node = NULL) {
return 'Some new output!';
}