class openlayers_plus_behavior_mapeditor in OpenLayers Plus 7.3
mapeditor Behavior
Hierarchy
- class \openlayers_behavior
Expanded class hierarchy of openlayers_plus_behavior_mapeditor
1 string reference to 'openlayers_plus_behavior_mapeditor'
- openlayers_plus_openlayers_behaviors in ./
openlayers_plus.module - Implements hook_openlayers_behaviors().
File
- behaviors/
openlayers_plus_behavior_mapeditor.inc, line 10 - Implementation of OpenLayers behavior.
View source
class openlayers_plus_behavior_mapeditor extends openlayers_behavior {
/**
* Provide initial values for options.
*/
function options_init() {
$options = array();
return $options;
}
/**
* Override of options_form().
*/
public function options_form($defaults = array()) {
$options['position'] = array(
'#type' => 'select',
'#title' => t('Position'),
'#options' => array(
'na' => t('None'),
'ne' => t('Top right'),
'se' => t('Bottom right'),
'sw' => t('Bottom left'),
'nw' => t('Top left'),
),
'#default_value' => isset($defaults['position']) ? $defaults['position'] : NULL,
);
return $options;
}
/**
* Render.
*/
function render(&$map) {
$option = array(
'mapeditorposition' => isset($this->options['position']) ? $this->options['position'] : 0,
);
drupal_add_js(array(
'openlayers_plus' => $option,
), 'setting');
drupal_add_js(drupal_get_path('module', 'openlayers_plus') . '/behaviors/openlayers_plus_behavior_mapeditor.js');
return $option;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
openlayers_behavior:: |
property | |||
openlayers_behavior:: |
function | 17 | ||
openlayers_behavior:: |
function | |||
openlayers_plus_behavior_mapeditor:: |
public | function |
Override of options_form(). Overrides openlayers_behavior:: |
|
openlayers_plus_behavior_mapeditor:: |
function |
Provide initial values for options. Overrides openlayers_behavior:: |
||
openlayers_plus_behavior_mapeditor:: |
function |
Render. Overrides openlayers_behavior:: |