Show / Hide Table of Contents

Class GraphicsOverlay

A collection of vector graphics for display in a map or scene view.

Inheritance
System.Object
GraphicsOverlay
Implements
System.ComponentModel.INotifyPropertyChanged
IPopupSource
ISnapSource
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class GraphicsOverlay : INotifyPropertyChanged, IPopupSource, ISnapSource
Remarks

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, 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 ZIndex value defines its draw order within the graphics overlay that contains it. The ZIndex value applies in a map view and a scene view if the scene view drapes the graphics on the surface (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 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 ZIndex explicitly on graphics.

To improve view responsiveness, you can set the RenderingMode to either of these options:

  • Dynamic - graphics are updated immediately as the GeoView is panned or zoomed (default).
  • Static - graphics are updated once the pan or zoom operation on the GeoView is finished. This is best for rendering large numbers of graphics.

Constructors

Name Description
GraphicsOverlay()

Initializes a new instance of the GraphicsOverlay class.

Properties

Name Description
Extent

Gets the calculated extent of the graphics contained in the overlay's Graphics collection.

FeatureReduction

Gets or sets the properties for dynamically aggregating and summarizing groups of graphics as the map scale and visible extent change.

Graphics

Gets the graphics collection.

Id

Gets or sets an ID for the overlay.

IsPopupEnabled

Gets or sets a value indicating whether the PopupDefinition defined is enabled.

IsVisible

Gets or sets a value indicating whether the overlay is visible.

LabelDefinitions

Gets a modifiable collection of label definitions for this graphics overlay.

LabelsEnabled

Gets or sets a value indicating whether labels should be displayed for Graphics in this overlay.

MaxScale

Gets or sets the maximum scale to display this layer at. A small number allows the map to display the layer when zooming further in.

MinScale

Gets or sets the minimum scale to render this layer at. A large number allows the map to display the layer when zooming further out.

Opacity

Gets or sets the opacity.

PopupDefinition

Gets or sets the pop-up definition for the graphics overlay.

Renderer

Gets or sets the renderer used for generating symbols.

RenderingMode

Gets or sets a value indicating which rendering mode to use.

ScaleSymbols

Gets or sets a value indicating whether the overlay's symbols and labels honor the map reference scale when displayed in a map view.

SceneProperties

Gets or sets the scene properties for the graphics overlay.

SelectedGraphics

Gets the selected graphics.

Methods

Name Description
ClearSelection()

Unselects all graphics in the layer

SelectGraphics(IEnumerable<Graphic>)

Selects the specified graphics.

UnselectGraphics(IEnumerable<Graphic>)

Unselects the specified graphics.

Events

Name Description
PropertyChanged

Occurs when a property value changes.

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

Relevant samples

Add graphics with symbols: Use a symbol style to display a graphic on a graphics overlay.
Buffer: Create a buffer around a map point and display the results as a `Graphic`
In This Article
Back to top Copyright © 2022 Esri.