function openlayers_behavior_layerswitcher::options_form in Openlayers 7.2
Same name and namespace in other branches
- 6.2 includes/behaviors/openlayers_behavior_layerswitcher.inc \openlayers_behavior_layerswitcher::options_form()
Overrides openlayers_behavior::options_form
File
- plugins/
behaviors/ openlayers_behavior_layerswitcher.inc, line 30 - Implementation of OpenLayers behavior.
Class
- openlayers_behavior_layerswitcher
- Layer Switcher Behavior
Code
function options_form($defaults = array()) {
return array(
'ascending' => array(
'#type' => 'checkbox',
'#title' => t('Show layers in ascending order'),
'#description' => t('Higher layers shown toward the bottom'),
'#default_value' => isset($defaults['ascending']) ? $defaults['ascending'] : TRUE,
),
'sortBaseLayer' => array(
'#type' => 'select',
'#title' => t('Sort Base Layers by Title'),
'#description' => t('Display the layers in the layer switcher by title'),
'#default_value' => isset($defaults['sortBaseLayer']) ? $defaults['sortBaseLayer'] : 0,
'#options' => array(
'0' => t('- None -'),
'ASC' => t('ASC'),
'DESC' => 'DESC',
),
),
'roundedCorner' => array(
'#type' => 'checkbox',
'#title' => t('Rounded corners'),
'#description' => t('If true the Rico library is used for rounding the corners of the layer switcher box.'),
'#default_value' => isset($defaults['roundedCorner']) ? $defaults['roundedCorner'] : TRUE,
),
'roundedCornerColor' => array(
'#type' => 'textfield',
'#title' => t('Rounded corners color'),
'#description' => t('For rounded corners, this is the CSS color to use for the corners.'),
'#default_value' => isset($defaults['roundedCornerColor']) ? $defaults['roundedCornerColor'] : '#222222',
),
'maximizeDefault' => array(
'#type' => 'checkbox',
'#title' => t('Maximize by Default'),
'#description' => t('Turn on to have the Layer Switcher open by default.'),
'#default_value' => isset($defaults['maximizeDefault']) ? $defaults['maximizeDefault'] : FALSE,
),
'div' => array(
'#type' => 'textfield',
'#title' => t('DIV element for LayerSwitcher'),
'#description' => t('To create the LayerSwitcher outside of the map, pass the ID attribute of an HTML div element.'),
'#default_value' => isset($defaults['div']) ? $defaults['div'] : FALSE,
),
);
}