GraphicsOverlay QML Type

A graphics overlay can display graphics on top of a GeoView. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

Each graphic contains a geometry describing the location and the shape of the graphic. A graphics overlay can contain graphics of various geometry types and can define symbology for the graphics it contains using its GraphicsOverlay.renderer. Each graphic can be associated with a symbol which controls how the graphic looks. Alternatively, the overlay can be associated with a renderer which manages the appearance of all graphics in the graphics overlay that do not have specific symbols associated with each of them. Graphics overlays display on top of all other data in a map or scene view.

A graphic's Z-index is used to define its draw order in the collection and is relevant for display in a two dimensional map. For dynamic 3D rendering (in a scene), graphic display order is determined by the distance to the camera rather than by Z-index. Z-index is considered, however, when using static rendering in a scene (draping graphics on the surface, in other words).

If Z-index for graphics is not set, they will usually render in the order in which they were added to the graphics overlay, the first added is rendered first and subsequent graphics 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. You can also place graphics of the same geometry type in their own graphics overlay and manage the order of the overlays in the view.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Rendererrenderer
Graphicgraphics (appends to model)
LayerScenePropertiessceneProperties
PopupDefinitionpopupDefinition
LabelDefinitionlabelDefinitions (since Esri.ArcGISRuntime 100.1) (appends to model)

Example:

Create a graphics overlay, add it to a map view, and add a graphic to the overlay (JavaScript):

// create graphics overlay and add it to the map view
var graphicsOverlay = ArcGISRuntimeEnvironment.createObject("GraphicsOverlay");
mapView.graphicsOverlays.append(graphicsOverlay);

// create a graphic
var point = ArcGISRuntimeEnvironment.createObject("Point", {x: 0, y: 0, spatialReference: Factory.SpatialReference.createWgs84()});
var simpleMarker = ArcGISRuntimeEnvironment.createObject("SimpleMarkerSymbol", {color: "red", size: 15, style: Enums.SimpleMarkerSymbolStyleX});
var graphic = ArcGISRuntimeEnvironment.createObject("Graphic", {symbol: simpleMarker, geometry: point});
graphic.attributes.attributesJson = {name: "Null Island"};

// add the graphic to the graphics overlay
graphicsOverlay.graphics.append(graphic);

See also PopupSource, Graphic, GraphicListModel, and LayerSceneProperties.

Property Documentation

extent : Envelope

The extent of the graphics.


[default] graphics : GraphicListModel

A list model representing the graphics in the GraphicsOverlay.


[default] labelDefinitions : LabelDefinitionListModel

Returns the list model of label definitions applied to the GraphicsOverlay (read-only).


labelsEnabled : bool

Whether graphics will be labeled in this overlay.

This property was introduced in Esri.ArcGISRuntime 100.1.


maxScale : double

The maximum scale to display graphics.


minScale : double

The minimum scale to display graphics.


opacity : real

The opacity of the graphics.


overlayId : string

The graphics overlay's ID.

This property was introduced in Esri.ArcGISRuntime 100.2.


[default] popupDefinition : PopupDefinition

See also PopupSource.


popupEnabled : bool

See also PopupSource.


[default] renderer : Renderer

The Renderer applied to the graphics.


renderingMode : GraphicsRenderingMode


scaleSymbols : bool

Whether the overlay's symbols and labels honor the Map reference scale when displayed in a MapView.

If the Map has a positive reference scale, and the overlay honors it, then symbols and labels will be drawn at their specified size when the viewing scale is the same as the reference scale, and will grow or shrink as the view zooms in or out, to keep the symbol a fixed size on the map.

If the Map has no reference scale, the reference scale is zero or the GraphicOverlay's scaleSymbols property is false, then the symbols and labels will be drawn at their fixed screen size.

The default value is false.

GraphicsOverlay::scaleSymbols only affects display in a MapView. The symbols and labels will be displayed at fixed screen size in a SceneView.

This property was introduced in Esri.ArcGISRuntime 100.7.


[default] sceneProperties : LayerSceneProperties

The 3D specific properties for a layer.


selectedGraphics : list<Graphic>

A list of the graphics that are currently selected.


visible : bool

The visibility of the GraphicsOverlay.


Signal Documentation

labelsEnabledChanged()

Emitted when the labelsEnabled property changes.

Note: The corresponding handler is onLabelsEnabledChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


maxScaleChanged()

Emitted when the maxScale property of this GraphicsOverlay changes.

Note: The corresponding handler is onMaxScaleChanged.


minScaleChanged()

Emitted when the minScale property of this GraphicsOverlay changes.

Note: The corresponding handler is onMinScaleChanged.


opacityChanged()

Emitted when the opacity property of this GraphicsOverlay changes.

Note: The corresponding handler is onOpacityChanged.


overlayIdChanged()

Emitted when the overlayId property changes.

Note: The corresponding handler is onOverlayIdChanged.

This signal was introduced in Esri.ArcGISRuntime 100.2.


popupDefinitionChanged()

Emitted when the popupDefinition property changes.

Note: The corresponding handler is onPopupDefinitionChanged.


popupEnabledChanged()

Emitted when the popupEnabled property changes.

Note: The corresponding handler is onPopupEnabledChanged.


rendererChanged()

Emitted when the renderer property of this GraphicsOverlay changes.

Note: The corresponding handler is onRendererChanged.


renderingModeChanged()

Emitted when the renderingMode property of this GraphicsOverlay changes.

Note: The corresponding handler is onRenderingModeChanged.


scaleSymbolsChanged()

Emitted when the scaleSymbols property of this GraphicsOverlay changes.

Note: The corresponding handler is onScaleSymbolsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.7.


scenePropertiesChanged()

Emitted when the sceneProperties of this GraphicsOverlay changes.

Note: The corresponding handler is onScenePropertiesChanged.


visibleChanged()

Emitted when the visible property of this GraphicsOverlay changes.

Note: The corresponding handler is onVisibleChanged.


Method Documentation

void clearSelection()

Clears the selection on the graphics overlay.


bool equals(Graphic other)

Returns true if other is equal to this GraphicsOverlay.


void selectGraphics(list<Graphic> graphics)

Selects the graphics in the graphics list.

Any graphics that are not in the overlay will be ignored.

This method was introduced in Esri.ArcGISRuntime 100.2.


void unselectGraphics(list<Graphic> graphics)

Unselects the graphics in the graphics list.

Any graphics that are not in the overlay will be ignored.

This method was introduced in Esri.ArcGISRuntime 100.2.


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