Group layer
- Last UpdatedMar 04, 2025
- 1 minute read
This type of layer provides a way to group other layers together. Having a group layer allows to set common options like visibility or opacity, to all child layers at once.
If data property is configured for a group layer, this data is applied to all custom child layers. This enables multiple layers to share the same data while allowing for different drawing configurations, such as using different symbols for the same feature.
The following table provides the specific configurable options available for this layer:
|
Property |
Type |
Description |
|---|---|---|
|
Data [Optional] |
Object |
Provides layer data to be passed to child custom layers. |
|
fold [Optional] |
Fold |
Enables group folding in Layer Switcher control and sets its initial state.
|
|
layers |
WidgetLayerOptions[] |
Defines Group child layers. |
|
type |
group |
A type of Layer. |
Examples of Group
Below an example of a group layer grouping two Esri layers.
-
Configuration and map preview

-
Configuration JSON string
{
"layers": [
{
"isBaseMap": false,
"title": "Esri States",
"type": "esri",
"url": "https://sampleserver.arcgisonline.com/arcgis/rest/services/Census/MapServer/"
},
{
"isBaseMap": false,
"title": "Esri Cities",
"type": "esri",
"url": "https://services.arcgis.com/PePLMYsRVChkJx/arcgis/rest/services/World_Cities/FeatureServer/0"
}
],
"title": "Group Esri",
"type": "group",
"isBaseMap": false
}