Group Layer (GroupLayer)

GroupLayer provides the ability to organize several sublayers into one common layer. Suppose there are several FeatureLayers that all represent water features in different dimensions. For example, wells (points), streams (lines), and lakes (polygons). The GroupLayer provides the functionality to treat them as one layer called Water Features even though they are stored as separate feature layers.

With respect to layer blending, sublayers of a group layer are blended together in isolation, separate from layers outside that group layer. When blendMode is specified for a group layer, the group's collective content is blended with the layer underneath.

With respect to scale visibility, sublayers of a group layer will be visible only within the scale range defined for the group layer. A sublayer may further restrict itself to a narrow scale range. In other words, a sublayer will be visible only when the current map scale intersects the scale range of that sublayer as well as the scale range of all its parent group layers.

Referenced by: operationalLayers

Properties

Property Details
blendMode Blend modes are used to create various effects by blending colors of top and background layers. normal blend mode is the default.
Valid values: average, color, color-burn, color-dodge, darken, destination-atop, destination-in, destination-out, destination-over, difference, exclusion, hard-light, hue, invert, lighten, lighter, luminosity, minus, multiply, normal, overlay, plus, reflect, saturation, screen, soft-light, source-atop, source-in, source-out, vivid-light, xor
effect Effect provides various filter functions to achieve different visual effects similar to how image filters (photo apps) work. Detailed description.
id A unique identifying string for the layer.
layers List of child operationalLayers
layerType String indicating the layer type.
Valid value of this property GroupLayer
maxScale A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator.
minScale A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator.
opacity The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.
title A user-friendly string title for the layer that can be used in a table of contents.
visibility Boolean property determining whether the layer is initially visible in the web map

groupLayer Example

{
  "id": "groupLayer",
  "layerType": "GroupLayer",
  "maxScale": 144447,
  "minScale": 0,
  "opacity": 1,
  "title": "US Census",
  "visibility": true,
  "layers": [
    {
      "id": "Census_6999",
      "title": "Census - states",
      "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
      "layerType": "ArcGISFeatureLayer"
    },
    {
      "id": "Census_616",
      "title": "Census - Detailed Counties",
      "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2",
      "layerType": "ArcGISFeatureLayer"
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.