Class GraphicsOverlay
A collection of vector graphics for display in a map or scene view.
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class GraphicsOverlay : INotifyPropertyChanged, IPopupSource
Remarks
Graphics overlays display on top of all other data in a map or scene view. A graphics overlay can contain graphics of various geometry types and can define symbology for the graphics it contains using its Renderer.
A graphic's Z-index can be used to define its draw order in the collection and is mostly relevant for display in a two dimensional map. For dynamic 3D rendering (in a scene), graphic display order is determined by the distance to the camera rather than by Z-index. Z-index is considered, however, when using static rendering in a scene (draping graphics on the surface, in other words).
If Z-index for graphics is not set, they will 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 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.
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. |
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. Must be a value between 0 and 1. |
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 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |