Constructor
new MapGroupState(layerGroupState, parentMapGroupopt)
Creating a map group state instance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layerGroupState |
LayerGroupState | the layer tree group config | |
parentMapGroup |
MapGroupState |
<optional> |
the parent layer map group |
- Source:
Extends
- MapItemState
Members
children :Array.<MapItemState>
Children items
Type:
- Array.<MapItemState>
- Source:
childrenCount :number
Children items count
Type:
- number
- Source:
mutuallyExclusive :boolean
The layer mutually exclusive activation (group only)
Type:
- boolean
- Source:
Methods
countExplodedMapLayers() → {number}
Count map layers by exploding the layers within every "group as layer" groups.
Used to get the actual total layers number for ordering purpose (i.e. assign correct zIndex value to each map layer)
- Source:
Returns:
The exploded layers count
- Type
- number
findMapLayerNames() → {Array.<string>}
Find layer names
- Source:
Returns:
The layer names of all map layers
- Type
- Array.<string>
findMapLayers() → {Array.<MapLayerState>}
Find layer items
- Source:
Returns:
The layer names of all map layers
- Type
- Array.<MapLayerState>
findMapLayersAndGroups() → {Array.<(MapLayerState|MapGroupState)>}
Find layer and group items
- Source:
Returns:
All map layers and map group states
- Type
- Array.<(MapLayerState|MapGroupState)>
(generator) getChildren() → {MapItemState}
Iterate through children items
- Source:
Yields:
The next child item
- Type
- MapItemState
getMapLayerByName(name) → {MapLayerState}
Get layer item by its name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the layer name |
- Source:
Returns:
The MapLayerState associated to the name
- Type
- MapLayerState
getMapLayerOrGroupByName(name) → {MapLayerState|MapGroupState}
Get layer or group item by its name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the layer or group name |
- Source:
Returns:
The MapLayerState or MapGroupState associated to the name
- Type
- MapLayerState | MapGroupState