Class: BaseLayersState

BaseLayerState.BaseLayersState(baseLayersCfg, lgCollection)

Class representing a base layers state

Constructor

new BaseLayersState(baseLayersCfg, lgCollection)

Create a base layers state based on the base layers config
Parameters:
Name Type Description
baseLayersCfg BaseLayersConfig the lizmap config object for base layers
lgCollection LayersAndGroupsCollection the collection of layers and groups state
Source:

Members

baseLayerNames :Array.<string>

Base layer names
Type:
  • Array.<string>
Source:

baseLayers :Array.<BaseLayerState>

Base layer configs
Type:
  • Array.<BaseLayerState>
Source:

selectedBaseLayer :BaseLayerState

Selected base layer config
Type:
  • BaseLayerState
Source:

selectedBaseLayerName :string

Selected base layer name
Type:
  • string
Source:

selectedBaseLayerName

Set selected base layer name
Source:

Methods

getBaseLayerByName(name) → {BaseLayerState}

Get a base layer config by base layer name
Parameters:
Name Type Description
name string the base layer name
Source:
Throws:
The base layer name is unknown
Type
RangeError
Returns:
The base layer config associated to the name
Type
BaseLayerState

(generator) getBaseLayerNames() → {string}

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

(generator) getBaseLayers() → {BaseLayerState}

Iterate through base layer configs
Source:
Yields:
The next base layer config
Type
BaseLayerState