ArcGIS Runtime SDK for iOS: AGSGraphic Class Reference
ArcGIS Runtime SDK for iOS  100.5
AGSGraphic Class Reference

Description

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 a 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
Inheritance diagram for AGSGraphic:
AGSObject <AGSGeoElement>

Instance Methods

(instancetype) - initWithGeometry:symbol:attributes:
 

Class Methods

(instancetype) + graphic
 
(instancetype) + graphicWithGeometry:symbol:attributes:
 

Properties

NSMutableDictionary< NSString *, id > * attributes
 
AGSGeometrygeometry
 
AGSGraphicsOverlaygraphicsOverlay
 
BOOL selected
 
AGSSymbolsymbol
 
BOOL visible
 
NSInteger zIndex
 

Method Documentation

§ graphic()

+ (instancetype) graphic

Initialize a new graphic

Returns
A new initialized graphic
Since
100

§ graphicWithGeometry:symbol:attributes:()

+ (instancetype) graphicWithGeometry: (nullable AGSGeometry *)  geometry
symbol: (nullable AGSSymbol *)  symbol
attributes: (nullable NSDictionary< NSString *, id > *)  attributes 

Initialize a new graphic

Parameters
geometryspecifying the location and shape of the graphic
symbolspecifying how the graphic should be rendered
attributesof key-value pairs representing information associated with the graphic
Returns
A new initialized graphic
Since
100

§ initWithGeometry:symbol:attributes:()

- (instancetype) initWithGeometry: (nullable AGSGeometry *)  geometry
symbol: (nullable AGSSymbol *)  symbol
attributes: (nullable NSDictionary< NSString *, id > *)  attributes 

Initialize a new graphic

Parameters
geometryspecifying the location and shape of the graphic
symbolspecifying how the graphic should be rendered
attributesof key-value pairs representing information associated with the graphic
Returns
A new initialized graphic
Since
100

Property Documentation

§ attributes

- (NSMutableDictionary<NSString*,id>*) attributes
readnonatomicstrong

A dictionary containing all the attributes.

Since
100

§ geometry

- (AGSGeometry*) geometry
readwritenonatomicstrong

The geometry that defines shape and location.

Since
100

§ graphicsOverlay

- (AGSGraphicsOverlay*) graphicsOverlay
readnonatomicweak

The graphics overlay containing this graphic, if any.

Since
100

§ selected

- (BOOL) selected
readwritenonatomicassign

Specifies whether the graphic should appear selected or not.

See also
AGSGraphicsOverlay::selectionColor
Since
100

§ symbol

- (AGSSymbol*) symbol
readwritenonatomicstrong

Symbol with which the graphic should be rendered

Since
100

§ visible

- (BOOL) visible
readwritenonatomicassign

Specifies whether the graphic should be visible or not.

Since
100

§ zIndex

- (NSInteger) zIndex
readwritenonatomicassign

The drawing index that controls the order in which graphics from a single graphics overlay are rendered.

Since
100