GraphicsOverlay QML Type
Manages a collection of graphics that can be displayed in a map view or scene view. More...
Import Statement: | import Esri.ArcGISRuntime |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
- List of all members, including inherited members
- GraphicsOverlay is part of QML Type List.
Properties
- extent : Envelope
- graphics : GraphicListModel
- labelDefinitions : LabelDefinitionListModel
- labelsEnabled : bool
- maxScale : double
- minScale : double
- opacity : real
- overlayId : string
- popupDefinition : PopupDefinition
- popupEnabled : bool
- renderer : Renderer
- renderingMode : GraphicsRenderingMode
- scaleSymbols : bool
- sceneProperties : LayerSceneProperties
- selectedGraphics : list<Graphic>
- visible : bool
Signals
- labelsEnabledChanged()
- maxScaleChanged()
- minScaleChanged()
- opacityChanged()
- overlayIdChanged()
- popupDefinitionChanged()
- popupEnabledChanged()
- rendererChanged()
- renderingModeChanged()
- scaleSymbolsChanged()
- scenePropertiesChanged()
- visibleChanged()
Methods
- void clearSelection()
- bool equals(Graphic other)
- void selectGraphics(list<Graphic> graphics)
- void unselectGraphics(list<Graphic> graphics)
Detailed Description
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 (GeoView::graphicsOverlays), and each graphics overlay can contain a collection of graphics (graphics). The graphics in the first GraphicsOverlay are drawn first, with subsequent graphics on top. The renderer defines the symbology of the 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 (Enums.SurfacePlacementDrapedFlat). 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 renderingMode to either of these options:
- Enums.GraphicsRenderingModeDynamic - graphics are updated immediately as the GeoView is panned or zoomed (default).
- Enums.GraphicsRenderingModeStatic - graphics are updated once the pan or zoom operation on the GeoView is finished. This is best for rendering large numbers of graphics.
See also PopupSource.
Property Documentation
[read-only] extent : Envelope |
Calculates and returns the extent of the graphics collection (read-only).
The extent's SpatialReference is that of the GeoView that contains the overlay. If the overlay is not in a view, returns null
. If the overlay is in a view but that view does not yet have a spatial reference, returns null
. If the overlay is in a view with a spatial reference, but has no graphics, then an empty envelope will be returned.
[default] graphics : GraphicListModel |
The modifiable collection of graphics in this graphics overlay.
You can add or remove graphics from this collection to modify what is displayed in the GeoView.
If Z-index for graphics is not set, they usually 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. 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.
The graphics property is initially empty and can never be null
.
[default] labelDefinitions : LabelDefinitionListModel |
The modifiable collection of LabelDefinition objects for this graphics overlay.
A LabelDefinition defines the text, appearance, and position of labels for the graphics. You can manage graphic labeling by defining new LabelDefinition objects and adding or removing them from this collection.
[since Esri.ArcGISRuntime 100.1] labelsEnabled : bool |
true
if labels are displayed for graphics in this graphics overlay, false
otherwise.
This property was introduced in Esri.ArcGISRuntime 100.1.
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.
This controls the maximum scale at which the graphics overlay is displayed. If the current map scale is smaller than the maximum scale, then this graphics overlay will not be displayed.
A scale is usually referred to as 1:X, where X is the scale specified here. This value is the relative scale to the real world, where one inch on the screen is X inches in the real world. Note that this is only an approximation and is dependent on the map's projection that can add some distortion, as well as the system's reported DPI setting which doesn't necessarily match the actual DPI of the screen.
The default value of this property is NaN
which makes the layer unbounded by any scale.
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.
This controls the minimum scale at which the graphics overlay is displayed. If the current map scale is larger than the minimum scale, then this graphics overlay will not be displayed.
A scale is usually referred to as 1:X, where X is the scale specified here. This value is the relative scale to the real world, where one inch on the screen is X inches in the real world. Note that this is only an approximation and is dependent on the map's projection that can add some distortion, as well as the system's reported DPI setting which doesn't necessarily match the actual DPI of the screen.
The default value of this property is NaN
which makes the layer unbounded by any scale
opacity : real |
The opacity for the graphics overlay.
Must be a value between 0
and 1
with 1
being solid or opaque and 0
being transparent. The default opacity is 1
.
[since Esri.ArcGISRuntime 100.2] 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 |
Defines how graphics in the overlay are symbolized when displayed.
Symbols set on the individual graphics will override the renderer.
renderingMode : GraphicsRenderingMode |
The rendering mode used to display graphics in the overlay.
For more efficient rendering of large numbers of graphics, set the rendering mode to Enums.GraphicsRenderingModeStatic. In order to ensure map responsiveness, static rendering does not refresh the display while pan and zoom operations are in progress. The amount of graphics an overlay can handle in this mode is mainly limited by the system memory.
[since Esri.ArcGISRuntime 100.7] 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 scene properties for the graphics overlay.
Use scene properties to control how graphics are displayed in a SceneView. For example, you can adjust the LayerSceneProperties::altitudeOffset or the LayerSceneProperties::surfacePlacement in the SceneView.
None of these settings are applied if the graphics overlay is added to a MapView.
[read-only] selectedGraphics : list<Graphic> |
A list of the graphics that are currently selected.
visible : bool |
true
if the graphics overlay is visible, false
otherwise.
Signal Documentation
|
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
.
|
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
.
|
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.
|
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.
|
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.