You are here

function openlayers_behavior_geofield::options_form in Geofield 7

Overrides openlayers_behavior::options_form

File

includes/behaviors/openlayers_behavior_geofield.inc, line 23
Implementation of OpenLayers behavior.

Class

openlayers_behavior_geofield
Map Form Values Behavior

Code

function options_form($defaults = array()) {
  $features = array(
    'point' => t('Point'),
    'path' => t('Path'),
    'polygon' => t('Polygon'),
  );
  return array(
    'feature_types' => array(
      '#title' => t('Available Features'),
      '#type' => 'checkboxes',
      '#options' => $features,
      '#description' => t('Select what features are available to draw.'),
      '#default_value' => isset($defaults['feature_types']) ? $defaults['feature_types'] : array(),
    ),
    'allow_edit' => array(
      '#title' => t('Allow shape modification'),
      '#type' => 'checkbox',
      '#description' => t('Can you edit and delete shapes.'),
      '#default_value' => isset($defaults['allow_edit']) ? $defaults['allow_edit'] : 1,
    ),
  );
}