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.9
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: 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 : bool

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.

ScaleSymbols can only be used when displaying the overlay 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

labelDefinitionsChanged()

Emitted when the labelDefinitions property changes.

Note: The corresponding handler is onLabelDefinitionsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


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.


selectionColorChanged()

Emitted when the selectionColor property of this GraphicsOverlay changes.

Note: The corresponding handler is onSelectionColorChanged.


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(other)

Returns true if other is equal to this GraphicsOverlay.


void selectGraphics(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(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.



Feedback on this topic?