function openlayers_map_load in Openlayers 7.2
Given a map name, get full map object.
This function can also be used as a menu loader for a style.
Parameters
$name: String identifier of the map.
$reset: Boolean whether to reset cache.
Return value
map object or FALSE if not found.
8 calls to openlayers_map_load()
- openlayers_build_map in ./
openlayers.module - Prepare a map for rendering.
- openlayers_maps_ui::edit_form in modules/
openlayers_ui/ plugins/ export_ui/ openlayers_maps_ui.class.php - Provide the actual editing form.
- openlayers_map_content_type_render in plugins/
content_types/ openlayers_map.inc - Run-time rendering of the body of the block.
- openlayers_preset_load in ./
openlayers.module - openlayers_render_map in ./
openlayers.module - Render a map by name
File
- ./
openlayers.module, line 827 - Main OpenLayers API File
Code
function openlayers_map_load($name = '', $reset = FALSE) {
ctools_include('export');
if ($reset) {
ctools_export_load_object_reset('openlayers_maps');
}
$maps = ctools_export_load_object('openlayers_maps', 'names', array(
$name,
));
if (empty($maps[$name])) {
return FALSE;
}
else {
$map = $maps[$name];
$map->data['map_name'] = $name;
return clone $map;
}
}