Class: BaseObjectLayersConfig

BaseObject.BaseObjectLayersConfig(layerConfig, cfg)

Class representing an object with layer configs with layerId and order attribute

Constructor

new BaseObjectLayersConfig(layerConfig, cfg)

Parameters:
Name Type Description
layerConfig function the class name to construct instances contain in cfg
cfg object the lizmap layers config object
Source:

Members

layerConfigs :Array.<BaseObjectLayerConfig>

The copy of the base layer configs or extended class
Type:
  • Array.<BaseObjectLayerConfig>
Source:

layerIds :Array.<string>

The copy of the layer ids
Type:
  • Array.<string>
Source:

layerNames :Array.<string>

The copy of the layer names
Type:
  • Array.<string>
Source:

Methods

getLayerConfigByLayerId(id) → {BaseObjectLayerConfig}

Get a layer config or extended class by layer id
Parameters:
Name Type Description
id string the layer id
Source:
Throws:
The layer name is unknown or the config has been corrupted
Type
RangeError | Error
Returns:
The base layer config or extended class associated to the id
Type
BaseObjectLayerConfig

getLayerConfigByLayerName(name) → {BaseObjectLayerConfig}

Get a layer config or extended class by layer name
Parameters:
Name Type Description
name string the layer name
Source:
Throws:
The layer name is unknown or the config has been corrupted
Type
RangeError | Error
Returns:
The base layer config or extended class associated to the name
Type
BaseObjectLayerConfig

(generator) getLayerConfigs() → {BaseObjectLayerConfig}

Iterate through layer configs
Source:
Yields:
The next layer config or extended class
Type
BaseObjectLayerConfig

(generator) getLayerIds() → {string}

Iterate through layer ids
Source:
Yields:
The next layer id
Type
string

(generator) getLayerNames() → {string}

Iterate through layer names
Source:
Yields:
The next layer name
Type
string