function openlayers_behavior_geolocate::render in Openlayers 7.2
Render.
Overrides openlayers_behavior::render
File
- plugins/
behaviors/ openlayers_behavior_geolocate.inc, line 70 - Implementation of OpenLayers behavior.
Class
- openlayers_behavior_geolocate
- Geolocate Behavior http://dev.openlayers.org/docs/files/OpenLayers/Control/Geolocate-js.html
Code
function render(&$map) {
//make sure that $option['bind'] is a true boolean, and not a string '0'.
$this->options['bind'] = !!$this->options['bind'];
drupal_add_js(drupal_get_path('module', 'openlayers') . '/plugins/behaviors/openlayers_behavior_geolocate.js');
return $this->options;
}