Constructor
new BaseLayersConfig(cfg, options, layers, baseLayersTreeGroupopt, hiddenTreeGroupopt)
Create a base layers config based on a config object, the options config object and the layers config
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cfg |
object | the lizmap config object for base layers | |
options |
object | the lizmap config object for options | |
layers |
LayersConfig | the lizmap layers config | |
baseLayersTreeGroup |
LayerTreeGroupConfig |
<optional> |
the layer tree group config which contains base layers |
hiddenTreeGroup |
LayerTreeGroupConfig |
<optional> |
the layer tree group config which contains hidden layers and in old config base layers |
- Source:
Members
baseLayerConfigs :Array.<BaseLayerConfig>
The copy of base layer configs
Type:
- Array.<BaseLayerConfig>
- Source:
baseLayerNames :Array.<string>
The copy of base layer names
Type:
- Array.<string>
- Source:
(nullable) startupBaselayerName :string
The startup base layer name
Type:
- string
- Source:
Methods
getBaseLayerConfigByBaseLayerName(name) → {BaseLayerConfig}
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 or the config has been corrupted
- Type
- RangeError | Error
Returns:
The base layer config associated to the name
- Type
- BaseLayerConfig
(generator) getBaseLayerConfigs() → {BaseLayerConfig}
Iterate through base layer configs
- Source:
Yields:
The next base layer config
- Type
- BaseLayerConfig
(generator) getBaseLayerNames() → {string}
Iterate through base layer names
- Source:
Yields:
The next base layer name
- Type
- string