Skip To Content ArcGIS for Developers Sign In Dashboard

GraphicsOverlay QML Type

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

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

Object

Properties

Signals

Methods

Detailed Description

Graphics may represent temporary data in your application, such as the results of a query or an analysis, or may be used to highlight existing content in the map.

Each graphic contains a geometry describing the location and the shape of the graphic. A graphics overlay typically contains graphics based on a single geometry type (Point, Multipoint, Polyline, or Polygon). 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 the graphics in the overlay that do not have specific symbols associate with each of them.

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: 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 QML 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 : bool

The graphics overlay's ID.

This QML 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


[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

labelDefinitionsChanged()

Emitted when the labelDefinitions property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


labelsEnabledChanged()

Emitted when the labelsEnabled property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


maxScaleChanged()

Emitted when the maxScale property of this GraphicsOverlay changes.


minScaleChanged()

Emitted when the minScale property of this GraphicsOverlay changes.


opacityChanged()

Emitted when the opacity property of this GraphicsOverlay changes.


overlayIdChanged()

Emitted when the overlayId property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.2.


popupDefinitionChanged()

Emitted when the popupDefinition property changes.


popupEnabledChanged()

Emitted when the popupEnabled property changes.


rendererChanged()

Emitted when the renderer property of this GraphicsOverlay changes.


renderingModeChanged()

Emitted when the renderingMode property of this GraphicsOverlay changes.


scenePropertiesChanged()

Emitted when the sceneProperties of this GraphicsOverlay changes.


selectionColorChanged()

Emitted when the selectionColor property of this GraphicsOverlay changes.


visibleChanged()

Emitted when the visible property of this GraphicsOverlay changes.


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 QML 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 QML method was introduced in Esri.ArcGISRuntime 100.2.



Feedback on this topic?