You are here

function openlayers_behavior_mouseposition::options_form in Openlayers 7.2

Same name and namespace in other branches
  1. 6.2 includes/behaviors/openlayers_behavior_mouseposition.inc \openlayers_behavior_mouseposition::options_form()

Overrides openlayers_behavior::options_form

File

plugins/behaviors/openlayers_behavior_mouseposition.inc, line 28
Implementation of OpenLayers behavior.

Class

openlayers_behavior_mouseposition
Mouse Position Behavior

Code

function options_form($defaults = array()) {
  return array(
    'prefix' => array(
      '#title' => t('Prefix'),
      '#type' => 'textfield',
      '#description' => t('A textual prefix to the mouse position.'),
      '#default_value' => isset($defaults['prefix']) ? $defaults['prefix'] : '',
    ),
    'separator' => array(
      '#title' => t('Separator'),
      '#type' => 'textfield',
      '#description' => t('A textual separator between the first and second value.'),
      '#default_value' => isset($defaults['separator']) ? $defaults['separator'] : ', ',
    ),
    'suffix' => array(
      '#title' => t('Suffix'),
      '#type' => 'textfield',
      '#description' => t('A textual suffix to the mouse position.'),
      '#default_value' => isset($defaults['suffix']) ? $defaults['suffix'] : '',
    ),
    'numDigits' => array(
      '#title' => t('Number of Decimal Digits'),
      '#type' => 'textfield',
      '#description' => t('Number of decimal digits to show.'),
      '#default_value' => isset($defaults['numDigits']) ? $defaults['numDigits'] : '',
    ),
    'emptyString' => array(
      '#title' => t('Empty Value'),
      '#type' => 'textfield',
      '#description' => t('What will be seen if there is no value for the mouse position.'),
      '#default_value' => isset($defaults['emptyString']) ? $defaults['emptyString'] : '',
    ),
  );
}