You are here

function openlayers_layer_type_load in Openlayers 6.2

Same name and namespace in other branches
  1. 7.2 openlayers.module \openlayers_layer_type_load()

Menu loader for layer types.

Parameters

$name: String identifier of layer type.

$reset: Boolean whether to reset cache or not.

Return value

An instantiated layer type object or FALSE if not found.

3 calls to openlayers_layer_type_load()
openlayers_ui_layers_form_submit in modules/openlayers_ui/includes/openlayers_ui.layers.inc
Submit handler for layers.
openlayers_ui_layers_import_validate in modules/openlayers_ui/includes/openlayers_ui.layers.inc
Validate handler to import a preset
openlayers_ui_layers_settings in modules/openlayers_ui/includes/openlayers_ui.layers.inc
Layer-wide-settings form

File

./openlayers.module, line 447
Main OpenLayers API File

Code

function openlayers_layer_type_load($name, $reset = FALSE) {
  ctools_include('plugins');
  if ($layer_type_class = ctools_plugin_load_class('openlayers', 'layer_types', $name, 'layer_type')) {
    $layer_type = new $layer_type_class();
    return $layer_type;
  }
  return FALSE;
}