A type of GeoElement that has a shape (geometry), symbol, and attributes and can be displayed in a map view or scene view.
public class Graphic : GeoElement, INotifyPropertyChanged
Graphics are used to represent temporary data that exists for the lifetime of the application. For example, you can:
- Show updated locations for objects in the map view, such as moving vehicles.
- Display results from an analysis, geocoding, or routing operation.
- Allow the user to draw temporary sketches on top of the map.
- Store user input, such as a set of route stops to visit.
- Show ad hoc text labels to describe things on the map.
To display a graphic, add it to a Graphics collection and add the graphics overlay to your map view or scene view.
Each graphic has a geometry describing its location and shape. To maximize performance, the geometry should have the same SpatialReference as the map view or scene view to which it is added. If the geometry has a different SpatialReference, it will be reprojected on-the-fly. This can be computationally expensive when displaying a large number of graphics.
A graphic can have an associated Symbol that defines the graphic's appearance. Alternatively, the GraphicsOverlay can be assigned a Renderer that determines the appearance of all graphics in the overlay. If a graphic has an associated symbol, the symbol will override the overlay's renderer for the graphic's display. The symbol used depends on the geometry type associated with the graphic. A MarkerSymbol is used for MapPoint and Multipoint geometries, a SimpleLineSymbol for Polyline geometries, and a SimpleFillSymbol for Polygon or Envelope geometries.
Each graphic can have a collection of attributes (as key-value pairs) to provide more information.
Initializes a new instance of the Graphic class with a
Initializes a new instance of the Graphic class with the given geometry.
Initializes a new instance of the Graphic class with the given geometry and symbol.
|Graphic(Geometry, IEnumerable<KeyValuePair<String, Object>>)||
Initializes a new instance of the Graphic class with the given geometry and attributes.
|Graphic(Geometry, IEnumerable<KeyValuePair<String, Object>>, Symbol)||
Initializes a new instance of the Graphic class with the given geometry, attributes, and symbol.
Initializes a new instance of the Graphic class with the given attributes.
Gets or sets the Geometry of this graphic.
Gets the GraphicsOverlay that this Graphic is attached to.
Gets or sets a value indicating whether this graphic is selected.
Gets or sets a value indicating whether this graphic is rendered on a map.
Gets or sets the Symbol for this graphic.
Gets or sets the draw order for graphics. Graphics with higher Z-index values are drawn on top of lower Z-index graphics.
Occurs when a property value changes.
|.NET Standard 2.0||100.3 - 200.3|
|.NET||100.13 - 200.3|
|.NET Windows||100.13 - 200.3|
|.NET Android||200.0 - 200.3|
|.NET iOS||200.0 - 200.3|
|.NET Framework||100.0 - 200.3|
|Xamarin.Android||100.0 - 100.15|
|Xamarin.iOS||100.0 - 100.15|
|UWP||100.0 - 200.3|