function openlayers_layer_load in Openlayers 7.2
Same name and namespace in other branches
- 6.2 openlayers.module \openlayers_layer_load()
Menu loader for layers. (%openlayers_layer)
Parameters
$name: Layer name
$reset: Boolean whether to reset cache or not
Return value
openlayers_layer_type|FALSE Layer export
6 calls to openlayers_layer_load()
- openlayers_behavior_cluster::options_form in plugins/
behaviors/ openlayers_behavior_cluster.inc - Provide form for configurations per map.
- openlayers_behavior_hover::options_form in plugins/
behaviors/ openlayers_behavior_hover.inc - openlayers_behavior_popup::options_form in plugins/
behaviors/ openlayers_behavior_popup.inc - Form defintion for per map customizations.
- openlayers_behavior_tooltip::options_form in plugins/
behaviors/ openlayers_behavior_tooltip.inc - Form defintion for per map customizations.
- openlayers_layers_ui::edit_form in modules/
openlayers_ui/ plugins/ export_ui/ openlayers_layers_ui.class.php - Provide the actual editing form.
File
- ./
openlayers.module, line 429 - Main OpenLayers API File
Code
function openlayers_layer_load($name, $reset = FALSE) {
ctools_include('export');
if ($reset) {
ctools_export_load_object_reset('openlayers_layers');
}
$layer = ctools_export_load_object('openlayers_layers', 'names', array(
$name,
));
if (is_array($layer) && isset($layer[$name])) {
$layer_object = openlayers_get_layer_object($layer[$name]);
if (openlayers_layer_sanity_check($layer_object)) {
return $layer_object;
}
}
else {
return FALSE;
}
}