GraphicsOverlay class final

Manages a collection of graphics that can be displayed in a map view or scene view.

Graphics overlays displays a collection of graphics on top of all the layers (including reference layers) in a map view or scene view. Every map view or scene view can contain a collection of graphics overlays (GeoViewController.graphicsOverlays), and each graphics overlay can contain a collection of graphics (GraphicsOverlay.graphics). The graphics in the first GraphicsOverlay are drawn first, with subsequent GraphicsOverlay.graphics on top. The GraphicsOverlay.renderer defines the symbology of the GraphicsOverlay.graphics collection.

A graphic's Graphic.zIndex value defines its draw order within the graphics overlay that contains it. The Graphic.zIndex value applies in a map view and a scene view if the scene view drapes the graphics on the surface (SurfacePlacement.drapedFlat). In other scene view rendering, the graphic's display order is determined by the distance to the camera rather than by Z-index.

If the Graphic.zIndex value is not set, graphics will render in the order in which they were added to the graphics overlay. The first added is rendered first and subsequent ones on top. In rare cases, the rendering algorithm may change the display order to provide more efficient rendering. If ordering is important, set the Graphic.zIndex explicitly on graphics.

To improve view responsiveness, you can set the GraphicsOverlay.renderingMode to either of these options:

Implemented types

Constructors

GraphicsOverlay()
Creates a graphics overlay object.
factory

Properties

extent Envelope?
Calculates and returns the extent of the GraphicsOverlay.graphics collection.
no setter
featureReduction FeatureReduction?
Defines properties for dynamically aggregating and summarizing groups of graphics as the map scale and visible extent change.
getter/setter pair
graphics List<Graphic>
The modifiable collection of graphics in this graphics overlay.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
A string that identifies the graphics overlay in the GeoViewController.graphicsOverlays collection.
getter/setter pair
isVisible bool
True if the graphics overlay is visible, false otherwise.
getter/setter pair
labelsEnabled bool
True if labels are displayed for graphics in this graphics overlay, false otherwise.
getter/setter pair
maxScale double
The maximum scale at which to display the graphics overlay. A small number allows the map to display the layer when zooming further in.
getter/setter pair
minScale double
The minimum scale at which to display the graphics overlay. A large number allows the map to display the layer when zooming further out.
getter/setter pair
opacity double
The opacity for the graphics overlay.
getter/setter pair
renderer Renderer?
Defines how graphics in the overlay are symbolized when displayed.
getter/setter pair
renderingMode GraphicsRenderingMode
The rendering mode used to display graphics in the overlay.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleSymbols bool
True if the graphic overlay's symbols and labels honor the map reference scale when displayed in a map view, false otherwise.
getter/setter pair

Methods

clearSelection() → void
Deselects all graphics in the graphics overlay.
getSelectedGraphics() List<Graphic>
Returns a collection of all the selected graphics in the graphics overlay.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectGraphics({required List<Graphic> graphics}) → void
Selects the specified graphics.
toString() String
A string representation of this object.
inherited
unselectGraphics({required List<Graphic> graphics}) → void
Unselects the specified graphics.

Operators

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