10.2.5: AGSDirectionGraphic Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSDirectionGraphic Class Reference

Description

Instances of this class represent an individual maneuver in a series of turn-by-turn driving directions.

Since
1.8
Inheritance diagram for AGSDirectionGraphic:
AGSGraphic <AGSCoding> <AGSCoding> <AGSFeature>

Instance Methods

(NSDictionary *) - allAttributes
 
(BOOL) - attributeAsBoolForKey:exists:
 
(NSDate *) - attributeAsDateForKey:
 
(double) - attributeAsDoubleForKey:exists:
 
(float) - attributeAsFloatForKey:exists:
 
(NSInteger) - attributeAsIntegerForKey:exists:
 
(int) - attributeAsIntForKey:exists:
 
(long) - attributeAsLongForKey:exists:
 
(NSString *) - attributeAsStringForKey:
 
(uint) - attributeAsUnsignedIntForKey:exists:
 
(id) - attributeForKey:
 
(void) - decodeWithJSON:
 
(NSDictionary *) - encodeToJSON
 
(BOOL) - hasAttributeForKey:
 
(id) - initWithGeometry:symbol:attributes:
 
(id) - initWithGeometry:symbol:attributes:infoTemplateDelegate:
 
(id) - initWithJSON:
 
(void) - removeAttributeForKey:
 
(id) - safeAttributeForKey:
 
(void) - setAllAttributes:
 
(void) - setAttribute:forKey:
 
(void) - setAttributes:
 
(void) - setAttributeToNullForKey:
 
(void) - setAttributeWithBool:forKey:
 
(void) - setAttributeWithDate:forKey:
 
(void) - setAttributeWithDouble:forKey:
 
(void) - setAttributeWithFloat:forKey:
 
(void) - setAttributeWithInt:forKey:
 
(void) - setAttributeWithInteger:forKey:
 
(void) - setAttributeWithLong:forKey:
 
(void) - setAttributeWithString:forKey:
 
(void) - setAttributeWithUnsignedInt:forKey:
 

Class Methods

(instancetype) + graphicWithFeature:
 
(id) + graphicWithGeometry:symbol:attributes:
 
(id) + graphicWithGeometry:symbol:attributes:infoTemplateDelegate:
 

Properties

NSArray * directionsStrings
 
NSUInteger drawIndex
 
NSDate * ETA
 
NSArray * events
 
NSUInteger featureId
 
AGSGeometrygeometry
 
id< AGSInfoTemplateDelegateinfoTemplateDelegate
 
AGSGraphicsLayerlayer
 
double length
 
AGSNADirectionsManeuver maneuverType
 
AGSSymbolsymbol
 
NSString * text
 
double time
 
double timeMinutes
 
BOOL visible
 

Method Documentation

- (NSDictionary*) allAttributes

Returns a dictionary containing all the attributes of the graphic. Attribute types supported are basically NSNull, NSString, NSDate, and NSNumber. Other attribute types will be ignored. The dictionary returned is a copy. Any changes you make to it do not affect the graphic.

Since
10.1.1

Reimplemented from <AGSFeature>.

- (BOOL) attributeAsBoolForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a BOOL value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (NSDate*) attributeAsDateForKey: (NSString *)  key

Returns the attribute value for the specified key as an NSDate value. Returns nil if key doesn't exist.

If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (double) attributeAsDoubleForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a double value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (float) attributeAsFloatForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a float value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (NSInteger) attributeAsIntegerForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as an NSInteger value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (int) attributeAsIntForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a int value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (long) attributeAsLongForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a long value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
- (NSString*) attributeAsStringForKey: (NSString *)  key

Returns the attribute value for the specified key as an NSString value. Returns nil if key doesn't exist. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (uint) attributeAsUnsignedIntForKey: (NSString *)  key
exists: (BOOL *)  exists 

Returns the attribute value for the specified key as a uint value. If you don't know the expected type of the value, use attributeForKey: or safeAttributeForKey:

Parameters
keyName of the attribute
existsparameter is set to YES if the key existed and the value is not NSNull. Note however, YES doesn't denote a successful conversion between data types with no loss.
Since
10.1.1
See also
- allAttributes for getting a copy of all graphic attributes as an NSDictionary
- (id) attributeForKey: (NSString *)  key

Returns the attribute value for the specified key. The type returned will be one of NSNull, NSString, NSDate, or NSNumber.

Parameters
keyName of the attribute
Since
10.1.1

Reimplemented from <AGSFeature>.

- (void) decodeWithJSON: (NSDictionary *)  json
optionalinherited

Decode object from JSON representation.

Parameters
jsonThe JSON representation of the object to be decoded.
Since
1.0
- (NSDictionary *) encodeToJSON
optionalinherited

Encode and return JSON representation for object.

Returns
JSON representation of object.
Since
1.0
+ (instancetype) graphicWithFeature: (id< AGSFeature >)  feature

Creates an AGSGraphic object from a generic id<AGSFeature>.

Parameters
featureThe feature with which to create the graphic from.
Returns
The created AGSGraphic object.
Since
10.2.2
+ (id) graphicWithGeometry: (AGSGeometry *)  geometry
symbol: (AGSSymbol *)  symbol
attributes: (NSDictionary *)  attributes 

Returns autoreleased graphic object. Only the geometry argument is mandatory.

Parameters
geometryThe geometry defining the graphic.
symbolThe symbol used to draw the graphic. Can be nil.
attributesKey-value pairs of fields and field values associated with the graphic.
Returns
A new, autoreleased, graphic object.
Since
10.2
+ (id) graphicWithGeometry: (AGSGeometry *)  geometry
symbol: (AGSSymbol *)  symbol
attributes: (NSDictionary *)  attributes
infoTemplateDelegate: (id< AGSInfoTemplateDelegate >)  infoTemplateDelegate 

Returns autoreleased graphic object. Only the geometry argument is mandatory.

Parameters
geometryThe geometry defining the graphic.
symbolThe symbol used to draw the graphic. Can be nil.
attributesKey-value pairs of fields and field values associated with the graphic.
infoTemplateDelegateThe template describing how to display attributes in the callout. Can be nil.
Returns
A new, autoreleased, graphic object.
Deprecated:
Deprecated at 10.2. Please use graphicWithGeometry:symbol:attributes: instead.
Since
1.0
- (BOOL) hasAttributeForKey: (NSString *)  key

Indicates whether the graphic contains an attribute for the specified key.

Parameters
keyName of the attribute
Since
10.1.1

Reimplemented from <AGSFeature>.

- (id) initWithGeometry: (AGSGeometry *)  geometry
symbol: (AGSSymbol *)  symbol
attributes: (NSDictionary *)  attributes 

Initialize the graphic object. Only the geometry argument is mandatory.

Parameters
geometryThe geometry defining the graphic.
symbolThe symbol used to draw the graphic. Can be nil.
attributesKey-value pairs of fields and field values associated with the graphic.
Returns
A new graphic object.
Since
10.2
- (id) initWithGeometry: (AGSGeometry *)  geometry
symbol: (AGSSymbol *)  symbol
attributes: (NSDictionary *)  attributes
infoTemplateDelegate: (id< AGSInfoTemplateDelegate >)  infoTemplateDelegate 

Initialize the graphic object. Only the geometry argument is mandatory.

Parameters
geometryThe geometry defining the graphic.
symbolThe symbol used to draw the graphic. Can be nil.
attributesKey-value pairs of fields and field values associated with the graphic.
infoTemplateDelegateThe template describing how to display attributes in the callout. Can be nil.
Returns
A new graphic object.
Deprecated:
Deprecated at 10.2. Please use initWithGeometry:symbol:attributes: instead.
Since
1.0
- (id) initWithJSON: (NSDictionary *)  json
optionalinherited

Initialize and return object from JSON representation.

Parameters
jsonThe JSON representation of the object to be created.
Returns
Object decoded from JSON representation.
Since
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (void) removeAttributeForKey: (NSString *)  key

Removes the attribute value for the specified key.

Since
10.1.1
- (id) safeAttributeForKey: (NSString *)  key

Returns the attribute value for the specified key. Since this is the "safe" version, if the value is NSNull it will return nil. The type returned will be one of NSString, NSDate, or NSNumber.

Parameters
keyName of the attribute
Since
10.1.1

Reimplemented from <AGSFeature>.

- (void) setAllAttributes: (NSDictionary *)  attributes

Sets attributes for this graphic based on key-value pairs specified in the provided dictionary. The dictionary is copied over. Any changes you make to the dictionary thereafter will not affect the graphic. If you want to update the graphic's attributes, you must call this method again.

Attribute types supported are basically NSNull, NSString, NSDate, and NSNumber. Other attribute types will be ignored.

Deprecated:
Deprecated at 10.2. Please use setAttributes: instead.
Since
10.1.1
- (void) setAttribute: (id)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key. If nil is passed in, it will remove the key.

Parameters
valueof the attribute
keyName of the attribute
Since
10.1.1

Reimplemented from <AGSFeature>.

- (void) setAttributes: (NSDictionary *)  attributes

Sets attributes for this graphic based on key-value pairs specified in the provided dictionary. The dictionary is copied over. Any changes you make to the dictionary thereafter will not affect the graphic. If you want to update the graphic's attributes, you must call this method again.

Attribute types supported are basically NSNull, NSString, NSDate, and NSNumber. Other attribute types will be ignored.

Since
10.2

Reimplemented from <AGSFeature>.

- (void) setAttributeToNullForKey: (NSString *)  key

Sets an attribute value to NSNull for the specified key.

Since
10.1.1
- (void) setAttributeWithBool: (BOOL)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithDate: (NSDate *)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithDouble: (double)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithFloat: (float)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithInt: (int)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithInteger: (NSInteger)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithLong: (long)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithString: (NSString *)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1
- (void) setAttributeWithUnsignedInt: (uint)  value
forKey: (NSString *)  key 

Sets an attribute value for the specified key.

Since
10.1.1

Property Documentation

- (NSArray*) directionsStrings
readnonatomiccopy

Array of AGSNADirectionsStrings objects that give more verbose information regarding the current direction.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
2.3
- (NSUInteger) drawIndex
readwritenonatomicassigninherited

The drawing index that controls the order the graphic is drawn in the layer.

Since
10.2
- (NSDate*) ETA
readnonatomiccopy

The estimated time of arrival after upon completion of the direction.

Since
1.8
- (NSArray*) events
readnonatomiccopy

Array of AGSDirectionEvent objects that give more verbose information regarding the current direction.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
10.2
- (NSUInteger) featureId
readnonatomicassigninherited

An ID that uniquely identifies this feature.

Since
10.2
- (AGSGeometry*) geometry
readwritenonatomiccopyinherited

The geometry that defines the graphic's shape and location. Note, the geometry object assigned to this property will be copied over. Any change you make to the geometry thereafter will not affect the graphic, because the graphic will continue to use its private copy. To update the graphic's geometry, assign the gometry object to the graphic again.

Since
10.1.1
- (id<AGSInfoTemplateDelegate>) infoTemplateDelegate
readwritenonatomicweakinherited

Template describing how the callout should display this graphic's attributes.

See also
AGSCalloutTemplate
Since
1.0
Deprecated:
Deprecated at 10.2. Use AGSCallout::delegate or AGSHitTestable::calloutDelegate instead.
- (AGSGraphicsLayer*) layer
readnonatomicweakinherited

The graphics layer that this graphic belongs to, if any.

Since
1.8
- (double) length
readnonatomicassign

The length of the direction.

Since
1.8
- (AGSNADirectionsManeuver) maneuverType
readnonatomicassign

The type of maneuver required to complete the direction.

Since
1.8
- (AGSSymbol*) symbol
readwritenonatomicstronginherited

The symbol for the graphic.

Since
1.0
- (NSString*) text
readnonatomiccopy

The text that describes the direction.

Since
1.8
- (double) time
readnonatomicassign

The time to complete the direction.

Since
1.8
Deprecated:
Deprecated at 10.2. Please use AGSDirectionGraphic::timeMinutes instead.
- (double) timeMinutes
readnonatomicassign

The time in minutes to complete the direction.

Since
10.2
- (BOOL) visible
readwritenonatomicassigninherited

Whether or not the graphic is visible in the layer.

Since
2.1