function hook_openlayers_layer_types in Openlayers 6.2
Same name and namespace in other branches
- 7.2 docs/openlayers.api.php \hook_openlayers_layer_types()
OpenLayers Layer Types
Provides information on layer types. This is a CTools plugin. Please see LAYER_TYPES.txt in the module for more information.
Return value
Return a nested associative array with the top level being a unique string identifier key which corresponds to the layers' types. The next level being an array of key/value pairs:
- "description":
- "layer_type":
2 functions implement hook_openlayers_layer_types()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- openlayers_openlayers_layer_types in ./
openlayers.module - Implementation of hook_openlayers_layer_types().
- openlayers_views_openlayers_layer_types in modules/
openlayers_views/ openlayers_views.module - Implementation of hook_openlayers_layer_types()
File
- docs/
openlayers.api.php, line 57 - 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_layer_types() {
// Take from openlayers.layer_types.inc
return array(
'openlayers_layer_type_google' => array(
'title' => t('Google'),
'description' => t('Google Maps API Map'),
'layer_type' => array(
'path' => drupal_get_path('module', 'openlayers') . '/includes/layer_types',
'file' => 'google.inc',
'class' => 'openlayers_layer_type_google',
'parent' => 'openlayers_layer_type',
),
),
);
}