function openlayers_layer_type_maptiler::options_form in Openlayers 6.2
Same name and namespace in other branches
- 7.2 plugins/layer_types/openlayers_layer_type_maptiler.inc \openlayers_layer_type_maptiler::options_form()
Options form which generates layers
Overrides openlayers_layer_type::options_form
File
- includes/
layer_types/ maptiler.inc, line 41 - TileWarper Layer Type
Class
- openlayers_layer_type_maptiler
- OpenLayers MapTiler Layer Type class
Code
function options_form() {
return array(
'base_url' => array(
'#type' => 'textfield',
'#title' => t('Base URL'),
'#default_value' => isset($this->data['base_url']) ? $this->data['base_url'] : '',
),
'isBaseLayer' => array(
'#type' => 'checkbox',
'#default_value' => isset($this->data['isBaseLayer']) ? $this->data['isBaseLayer'] : TRUE,
'#title' => t('BaseLayer'),
'#description' => t('Uncheck to make this map an overlay'),
),
'resolutions' => array(
'#type' => 'select',
'#multiple' => TRUE,
'#options' => array_combine(array_map('strval', openlayers_get_resolutions('900913')), range(0, 18)),
'#title' => t('Zoom Level Range'),
'#default_value' => isset($this->data['resolutions']) ? $this->data['resolutions'] : array_map('strval', openlayers_get_resolutions('900913')),
),
'layer_type' => array(
'#type' => 'hidden',
'#value' => 'openlayers_layer_type_maptiler',
),
);
}