GroupLayer class final

A container for other layers and group layers. It is used to represent datasets that are composed of multiple layers to be managed as a single layer with respect to display in a map or scene.

Group layers are designed for presentation of operational layers that are related by a theme. You can add several related operational child layers into a group layer so the layers can be displayed together. Suppose there are several feature layers that represent existing infrastructure projects (buildings, sidewalks, roads, and trees). You can add these feature layers into a single group layer called "Existing". Similarly assume there are also proposed infrastructure projects that are features in other layers. These layers can be added to a group layer called "Planned". You can manage the visibility of the existing or planned features as separate groups.

For the most part, group layers behave like any other layer in that:

  • A group layer has visual properties (visibility, opacity) that can be applied to all layers in the group layer at once. This is helpful when controlling the visibility of the group.
  • You can set a scale range on a group layer using the minimum and maximum scale properties. If a child layer has more restricted scale range, that scale range will be honored for that child layer.
  • A group layer may be queried for the aggregate geographic extent of its child layers
  • A group layer may be nested inside another group layer. There is no defined nesting level limit.
  • Cloning a group layer will also clone its child layers
  • A group layer does not have its own attribute values. The text from the child layers is displayed instead.
  • A group layer is not time-aware, but may contain layers that are
  • A group layer cannot be added to a basemap

The full extent of a group layer is derived asynchronously based on what information is available from the child layers. This means the full extent can change when child layers are added or removed. The full extent geometry will have the spatial reference of the first loaded child layer.

The visual opacity property of the group layer affects the opacity of the child layers. The opacity of the child layers is a mathematical product of the individual child layer's opacity and the group layer's opacity. Opacity values range from 0.0 (transparent) to 1.0 (opaque). This means that setting the opacity of the group layer to 0.0 will make all child layers transparent [0 * AnyNumber = 0]. Likewise when the group layer opacity is 1.0, will set the opacity of the child layers to their individual layer opacity 1 * AnyNumber = AnyNumber.

Inheritance

Constructors

GroupLayer({List<Layer> layers = const []})
Creates a group layer object with child layers.
factory

Properties

attribution String
The attribution text for the layer.
no setterinherited
canChangeVisibility bool
A flag indicating whether the layer content's visibility can be changed.
no setterinherited
description String
The description for the layer.
getter/setter pairinherited
fullExtent Envelope?
The full extent of this layer, which is the extent where all layer data is contained.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifying string for the layer, as specified in a map or scene.
getter/setter pairinherited
isIdentifyEnabled bool
True if the layer supports identify, false otherwise.
no setterinherited
isVisible bool
The layer content's visibility.
getter/setter pairinherited
item Item?
The item the layer has been created from.
no setterinherited
layers List<Layer>
The child layers associated with a group layer.
no setter
loadError ArcGISException?
The load error.
no setterinherited
loadStatus LoadStatus
The load status.
no setterinherited
maxScale double
The maximum scale for the layer.
getter/setter pairinherited
minScale double
The minimum scale for the layer.
getter/setter pairinherited
name String
The layer content's name.
getter/setter pairinherited
onLoadStatusChanged Stream<LoadStatus>
A stream that reports changes to the LoadStatus.
no setterinherited
onSubLayerContentChanged Stream<List<LayerContent>>
Callback invoked when the sublayer content of the layer content have changed.
no setterinherited
onVisibilityChanged Stream<bool>
Callback invoked when the visibility of the layer changes.
no setterinherited
opacity double
The opacity for the layer.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showChildrenInLegend bool
Determines if the child layers should be shown in the map legend.
getter/setter pair
showInLegend bool
A flag indicating whether the layer content participates in the legend.
getter/setter pairinherited
spatialReference SpatialReference?
The spatial reference of the layer.
no setterinherited
subLayerContents List<LayerContent>
The sub layer contents of a layer content.
no setterinherited
visibilityMode GroupVisibilityMode
The visibility mode for the layers in a table of contents.
getter/setter pair

Methods

cancelLoad() → void
Cancels loading metadata for the object.
inherited
clone() Layer
Clones this instance of the layer and its members.
inherited
fetchLegendInfos() Future<List<LegendInfo>>
Fetches the list of legend info.
inherited
isVisibleAtScale(double scale) bool
Returns the layer content's effective visibility at the specified scale.
inherited
load() Future<void>
Loads the metadata for the object asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retryLoad() Future<void>
Loads or retries loading metadata for the object asynchronously.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited