A graphic on top of a map.
Instances of this class represent graphics. Graphics can be displayed on the map through an AGSGraphicsOverlay
. Graphics can be used as input to a task, or they can be used to display output from a task, or in response to user interaction.
Each graphic must contain an AGSGeometry
describing the location and the shape of the graphic. The geometry preferably should be in the same spatial reference as the map, otherwise it will be reprojected on-the-fly (computationally expensive for large number of graphics)
A graphic can be associated with an AGSSymbol
which determines how the graphic looks. Alternatively, the graphics overlay can be assgined an AGSRenderer
which determines the appearance of all graphics in the overlay. Note, symbols associated with individual graphics take precedence over the symbols chosen by the renderer. The symbol used depends upon the geometry type associated with the graphic. An AGSMarkerSymbol
is used for point and multipoint geometries, AGSLineSymbol
for polyline geometries, and AGSFillSymbol
for polygon geometries.
A graphic can contain a set of attributes (key-value pairs) providing more information about the graphic. Some of this information can be displayed in an AGSCallout
when a user taps on the graphic.
Graphic objects respond to key value coding (KVC) methods for setting and getting attribute values.
- Since
- 100
Defines the draw order for graphics. Graphics with higher Z-index values are drawn on top of lower Z-index graphics A graphic's Z-index 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 is not set, graphics 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 AGSGraphic::zIndex
property 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 AGSMapView
or AGSSceneView
objects.
- Since
- 100