new LayerGroup(userParameters)
| Name | Type | Description |
|---|---|---|
userParameters |
string | Mx.parameters.Layer |
parameters provided by the user |
Extends
- M.facade.Base
Members
-
collapsed{Boolean}
-
'true' to display the group collapsed in the TOC, 'false' to display it expanded
-
id{String}
-
Id for this LayerGroup, must be bunique
-
order{Number}
-
Position of the group in the TOC
-
parent{M.layer.Group}
-
Parent group of this group, if any
-
title{String}
-
Title of the group, to be displayed in TOC
-
zIndex_{Number}
-
Methods
-
module:M/layer/LayerGroup~LayerGroup.findGroupById(Id, layerGroup)
facade/js/layer/LayerGroup.js, line 316 -
Searchs a group by its id, recursively if there are nested groups.
Name Type Description IdNumber layerGroupArray.<LayerGroup> array of groups to perform the search
-
addChild(layer, index)
facade/js/layer/LayerGroup.js, line 187 -
Adds a child to the group
Name Type Default Description layerM.Layer | M.LayerBase Layer to add to the group
indexNumber last position Position to add the layer to, starting from 0
-
addChildren(children)
facade/js/layer/LayerGroup.js, line 259 -
Adds children to the group
Name Type Description childrenArray.<(M.LayerBase|M.LayerGroup)> -
addTo(map)
facade/js/layer/LayerGroup.js, line 128 -
Sets the map object of the group
Name Type Description mapM.Map -
deleteChild(child)
facade/js/layer/LayerGroup.js, line 218 -
Deletes a child from the group
Name Type Description childM.LayerBase | M.LayerGroup Child to delete
-
deleteChildren(children)
facade/js/layer/LayerGroup.js, line 236 -
Deletes children from the group
Name Type Description childrenArray.<(M.LayerBase|M.LayerGroup)> children to delete
-
destroy()
facade/js/layer/LayerGroup.js, line 304 -
Destroys the group and all its layers
-
Returns all those children that are instances of LayerBase, whether they are direct children of the group, or children from inner groups.
-
Returns all the children inside the group
-
getZIndex(){Number}
facade/js/layer/LayerGroup.js, line 175 -
Gets the zIndex of the group, which is the lowest zIndex of its layers
Returns:
zIndex of the group
-
setVisible(visibility)
facade/js/layer/LayerGroup.js, line 145 -
Sets the visibility for the LayerGroup and all of its layers.
Name Type Description visibilityboolean Visibility to set
-
setZIndex(zIndex)
facade/js/layer/LayerGroup.js, line 157 -
The Z-index is applied to the first layer of the group, then it is increased by one and applied to the next layer of the group, and so on.
Name Type Description zIndexNumber -
ungroup(child)
facade/js/layer/LayerGroup.js, line 247 -
Moves a child out of a group, to the root level of the toc
Name Type Description childM.LayerBase | M.LayerGroup