You are here

function gmap_geo_widget_settings in GMap Addons 7

Same name and namespace in other branches
  1. 6 gmap_geo/gmap_geo.module \gmap_geo_widget_settings()

Implementation of hook_widget_settings(). Adds a place to set a GMap macro for the initial location picker map.

File

gmap_geo/gmap_geo.module, line 50
Provides a Google maps location picker widget for Geo cck fields. Provides a field formatter for Geo fields that displays point, line, or polygon data on a Google map.

Code

function gmap_geo_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form = array();
      $form['gmap_geo_picker_macro'] = array(
        '#type' => 'textfield',
        '#title' => 'GMap macro',
        '#default_value' => $widget['gmap_geo_picker_macro'] ? $widget['gmap_geo_picker_macro'] : '[gmap]',
        '#description' => t("A GMap macro describing the initial location picker map. <em>[gmap]</em> displays a map with the settings from !gmap-admin.", array(
          '!gmap-admin' => l('admin/settings/gmap', 'admin/settings/gmap'),
        )),
      );
      return $form;
    case 'save':
      return array(
        'gmap_geo_picker_macro',
      );
  }
}