function openlayers_layer_type_google::options_form in Openlayers 7.2
Same name and namespace in other branches
- 6.2 includes/layer_types/google.inc \openlayers_layer_type_google::options_form()
Options form which generates layers
Overrides openlayers_layer_type::options_form
File
- plugins/
layer_types/ openlayers_layer_type_google.inc, line 26 - Google Layer Type
Class
- openlayers_layer_type_google
- OpenLayers Google Layer Type class
Code
function options_form($defaults = array()) {
$google_layer_types = array(
'hybrid' => 'Hybrid',
'normal' => 'Normal',
'satellite' => 'Satellite',
'physical' => 'Physical',
);
return array(
'type' => array(
'#title' => t('Google Layer Type'),
'#type' => 'select',
'#default_value' => isset($this->data['type']) ? $this->data['type'] : 'normal',
'#options' => $google_layer_types,
),
'numZoomLevels' => array(
'#type' => 'textfield',
'#title' => t('Number of Zoom Levels'),
'#description' => t('Satellite and hybrid maps are occasionally
unavailable at higher zoom levels.'),
'#default_value' => isset($this->data['numZoomLevels']) ? $this->data['numZoomLevels'] : '21',
),
'animationEnabled' => array(
'#type' => 'checkbox',
'#title' => t('Animation Enabled'),
'#description' => t('This enables the Google Maps API zooming animation.
If you are having issues with your Google layer, it may be helpful
to turn this off.'),
'#default_value' => isset($this->data['animationEnabled']) ? $this->data['animationEnabled'] : TRUE,
),
);
}