function hook_openlayers_behaviors in Openlayers 7.2
Same name and namespace in other branches
- 6.2 docs/openlayers.api.php \hook_openlayers_behaviors()
OpenLayers Behaviors
This hook tells OpenLayers about the available behaviors that can be used in maps.
Ensure that you are telling CTools about this as well.
Return value
Return a nested associative array with the top level being a unique string identifier, and the nested array containing the following key/pairs:
- "title":
- "description":
- "file":
- "type":
- "behavior":
See also
openlayers_example_ctools_plugin_api().
1 function implements hook_openlayers_behaviors()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- openlayers_openlayers_behaviors in ./
openlayers.module - Implements hook_openlayers_behaviors().
File
- docs/
openlayers.api.php, line 178 - Hooks provided by the OpenLayers suite of modules. This file allows hooks to be documented automatically with Doxygen, like on api.drupal.org.
Code
function hook_openlayers_behaviors() {
// Taken from openlayers.behaviors.inc
return array(
'openlayers_behavior_attribution' => array(
'title' => t('Attribution'),
'description' => t('Allows layers to provide attribution to the map if it exists.'),
'type' => 'layer',
'path' => drupal_get_path('module', 'openlayers') . '/includes/behaviors',
'file' => 'openlayers_behavior_attribution.inc',
'behavior' => array(
'class' => 'openlayers_behavior_attribution',
'parent' => 'openlayers_behavior',
),
),
);
}