Class GraphicsOverlay
A collection of vector graphics for display in a map or scene view.
Inheritance
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:
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
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |