|
ArcGIS Runtime SDK for iOS
100.9
|
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.
Instance Methods | |
| (instancetype) | - initWithGeometry:symbol:attributes: |
Class Methods | |
| (instancetype) | + graphic |
| (instancetype) | + graphicWithGeometry:symbol:attributes: |
Properties | |
| NSMutableDictionary< NSString *, id > * | attributes |
| AGSGeometry * | geometry |
| AGSGraphicsOverlay * | graphicsOverlay |
| BOOL | selected |
| AGSSymbol * | symbol |
| BOOL | visible |
| NSInteger | zIndex |
| + (instancetype) graphic |
Initialize a new graphic
| + (instancetype) graphicWithGeometry: | (nullable AGSGeometry *) | geometry | |
| symbol: | (nullable AGSSymbol *) | symbol | |
| attributes: | (nullable NSDictionary< NSString *, id > *) | attributes | |
Initialize a new graphic
| geometry | specifying the location and shape of the graphic |
| symbol | specifying how the graphic should be rendered |
| attributes | of key-value pairs representing information associated with the graphic |
| - (instancetype) initWithGeometry: | (nullable AGSGeometry *) | geometry | |
| symbol: | (nullable AGSSymbol *) | symbol | |
| attributes: | (nullable NSDictionary< NSString *, id > *) | attributes | |
Initialize a new graphic
| geometry | specifying the location and shape of the graphic |
| symbol | specifying how the graphic should be rendered |
| attributes | of key-value pairs representing information associated with the graphic |
|
readnonatomicstrong |
A dictionary containing all the attributes.
|
readwritenonatomicstrong |
The geometry that defines shape and location.
|
readnonatomicweak |
The graphics overlay containing this graphic, if any.
|
readwritenonatomicassign |
Specifies whether the graphic should appear selected or not.
|
readwritenonatomicstrong |
Symbol with which the graphic should be rendered
|
readwritenonatomicassign |
Specifies whether the graphic should be visible or not.
|
readwritenonatomicassign |
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).