ArcGIS Runtime SDK for iOS: AGSDictionaryRenderer Class Reference
ArcGIS Runtime SDK for iOS  100.12
AGSDictionaryRenderer Class Reference

Description

Renders @AGSGeoElements using symbols generated from an AGSDictionarySymbolStyle.

The DictionaryRenderer applies symbols to features or graphics according to a set of input attribute values. The symbol primitives and logic (rule engine) for applying symbols is provided by an associated AGSDictionarySymbolStyle. The AGSDictionarySymbolStyle depends on attribute names to define the symbology of each feature. The attributes reference different symbol components in the style, which are assembled to create a complex symbol. In order to display geoelements using the AGSDictionaryRenderer, attributes in your data must either use the expected attribute names or be mapped to the proper style attributes.

See also
AGSDictionarySymbolStyle
Since
100.0
Inheritance diagram for AGSDictionaryRenderer:
AGSRenderer AGSObject <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithDictionarySymbolStyle:
 
(instancetype) - initWithDictionarySymbolStyle:symbologyFieldOverrides:textFieldOverrides:
 
(BOOL) - isEqualToRenderer:
 
(AGSSymbol *) - symbolForFeature:
 
(AGSSymbol *) - symbolForFeature:applyAttributeOverrides:
 
(AGSSymbol *) - symbolForGraphic:
 
(AGSSymbol *) - symbolForGraphic:applyAttributeOverrides:
 
(nullable id) - toJSON:
 

Class Methods

(instancetype) + dictionaryRendererWithDictionarySymbolStyle:
 
(instancetype) + dictionaryRendererWithDictionarySymbolStyle:symbologyFieldOverrides:textFieldOverrides:
 
(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

AGSDictionarySymbolStyledictionarySymbolStyle
 
NSString * rotationExpression
 
AGSRotationType rotationType
 
AGSArcadeExpressionscaleExpression
 
AGSRendererScenePropertiessceneProperties
 
NSDictionary< NSString *, NSString * > * symbologyFieldOverrides
 
NSDictionary< NSString *, NSString * > * textFieldOverrides
 
double textVisibilityMaxScale
 
double textVisibilityMinScale
 
BOOL textVisible
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ dictionaryRendererWithDictionarySymbolStyle:

+ (instancetype) dictionaryRendererWithDictionarySymbolStyle: (AGSDictionarySymbolStyle *)  dictionarySymbolStyle

Initialize the renderer with a reference to the dictionary symbol style.

Parameters
dictionarySymbolStyleto use
Returns
a new dictionary renderer
Since
100

◆ dictionaryRendererWithDictionarySymbolStyle:symbologyFieldOverrides:textFieldOverrides:

+ (instancetype) dictionaryRendererWithDictionarySymbolStyle: (AGSDictionarySymbolStyle *)  dictionarySymbolStyle
symbologyFieldOverrides: (NSDictionary< NSString *, id > *)  symbologyFieldOverrides
textFieldOverrides: (NSDictionary< NSString *, NSString * > *)  textFieldOverrides 

Initialize the renderer with a reference to the dictionary symbol style.

Parameters
dictionarySymbolStyleto use
symbologyFieldOverridesspecifying the mapping between the field names that dictionarySymbolStyle specification expects and the field names in the source data
textFieldOverridesspecifying the mapping between the field names that dictionarySymbolStyle specification expects and the field names in the source data
Returns
a new dictionary renderer
Since
100

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithDictionarySymbolStyle:

- (instancetype) initWithDictionarySymbolStyle: (AGSDictionarySymbolStyle *)  dictionarySymbolStyle

Initialize the renderer with a reference to the dictionary symbol style.

Parameters
dictionarySymbolStyleto use
Returns
a new dictionary renderer
Since
100

◆ initWithDictionarySymbolStyle:symbologyFieldOverrides:textFieldOverrides:

- (instancetype) initWithDictionarySymbolStyle: (AGSDictionarySymbolStyle *)  dictionarySymbolStyle
symbologyFieldOverrides: (NSDictionary< NSString *, id > *)  symbologyFieldOverrides
textFieldOverrides: (NSDictionary< NSString *, NSString * > *)  textFieldOverrides 

Initialize the renderer with a reference to the dictionary symbol style.

Parameters
dictionarySymbolStyleto use
symbologyFieldOverridesspecifying the mapping between the field names that dictionarySymbolStyle specification expects and the field names in the source data
textFieldOverridesspecifying the mapping between the field names that dictionarySymbolStyle specification expects and the field names in the source data
Returns
a new dictionary renderer
Since
100

◆ isEqualToRenderer:

- (BOOL) isEqualToRenderer: (AGSRenderer *)  other

Compares two renderers for equality.

Parameters
otherrenderer to compare this one to.
Returns
YES if other is equal to self, otherwise NO.
Since
100

◆ symbolForFeature:

- (AGSSymbol*) symbolForFeature: (AGSFeature *)  feature

Creates a symbol for the feature based on the scheme used by this renderer.

Parameters
featureThe feature to determine the symbol for.
Returns
A new symbol for the feature.
Since
100

◆ symbolForFeature:applyAttributeOverrides:

- (AGSSymbol*) symbolForFeature: (AGSFeature *)  feature
applyAttributeOverrides: (BOOL)  applyAttributeOverrides 

Creates a symbol for the feature based on the scheme used by this renderer and optionally apply attribute overrides.

If applyAttributeOverrides is set to YES and renderer contains an override expression, this method will return a symbol modified by the expression. If the expression cannot be properly evaluated due to missing fields or external data, then the original symbol is returned.

Parameters
featureThe feature to determine the symbol for.
applyAttributeOverridesIf set YES, applies the override attributes from the renderer.
Returns
A symbol for the feature.
Since
105

◆ symbolForGraphic:

- (AGSSymbol*) symbolForGraphic: (AGSGraphic *)  graphic

Creates a symbol for the graphic based on the scheme used by this renderer.

Parameters
graphicThe graphic to determine the symbol for.
Returns
A symbol for the graphic.
Since
100

◆ symbolForGraphic:applyAttributeOverrides:

- (AGSSymbol*) symbolForGraphic: (AGSGraphic *)  graphic
applyAttributeOverrides: (BOOL)  applyAttributeOverrides 

Creates a symbol for the graphic based on the scheme used by this renderer and optionally apply attribute overrides.

Parameters
graphicThe graphic to determine the symbol for.
applyAttributeOverridesIf set YES, applies the override attributes from the renderer.
Returns
A symbol for the graphic.
Since
100.5

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

◆ dictionarySymbolStyle

- (AGSDictionarySymbolStyle*) dictionarySymbolStyle
readwritenonatomicstrong

The dictionary symbol style to be applied by the renderer

Since
100

◆ rotationExpression

- (NSString*) rotationExpression
readwritenonatomiccopyinherited

Constant value or an expression that specifies the angle of rotation based on a feature's attribute value. When an attribute name is specified in rotationExpression, it's enclosed in square brackets, for example, [Rotation].

Since
100

◆ rotationType

- (AGSRotationType) rotationType
readwritenonatomicassigninherited

Controls the origin and direction of rotation. If the rotationType is defined as AGSRotationTypeTypeArithmetic, the symbol is rotated from East in a counter-clockwise direction where East is the 0° axis. If the rotationType is defined as AGSRotationTypeGeographic, the symbol is rotated from North in a clockwise direction where North is the 0° axis.

Since
100

◆ scaleExpression

- (AGSArcadeExpression*) scaleExpression
readwritenonatomicstrong

An AGSArcadeExpression object with an expression for scaling symbols in a dictionary renderer.

AGSArcadeExpression is evaluated at rendering time. If the expression is not valid or results in an invalid value, symbols will not be scaled and will display at their original size.

For example to scale symbols based on attribute value, AGSArcadeExpression::expression property can be set to something like iif($feature.Symbol_Set == 40, 2.5, 1). This means that a scale symbol size is 2.5 times when symbol_set is 40

Since
100.11

◆ sceneProperties

- (AGSRendererSceneProperties*) sceneProperties
readwritenonatomicstronginherited

Properties to apply only when rendering data in 3D scenes using AGSSceneView.

Since
100

◆ symbologyFieldOverrides

- (NSDictionary<NSString*, NSString*>*) symbologyFieldOverrides
readwritenonatomiccopy

The NSDictionary of a symbology attribute and its override used to fetch a symbol from the dictionary symbol style. An AGSDictionarySymbolStyle uses a collection of expected attribute names to build a symbol based on input values. When initialized, fields in the input dataset are mapped to the expected attribute names using case-insensitive matching. If your data uses a different name for an expected symbol attribute, use the AGSDictionaryRenderer::symbologyFieldOverrides to map an expected field to the correct field in your data. You can also exclude an expected field by providing an empty string for it in the overrides.

Since
100.0

◆ textFieldOverrides

- (NSDictionary<NSString*, NSString*>*) textFieldOverrides
readwritenonatomiccopy

The NSDictionary of a text attribute and its override used to fetch symbol text and placement from the dictionary symbol style. An AGSDictionarySymbolStyle uses a collection of expected attribute names to build a symbol based on input values. When initialized, fields in the input dataset are mapped to the expected attribute names using case-insensitive matching. If your data uses a different name for an expected text attribute, use the AGSDictionaryRenderer::textFieldOverrides to map an expected field to the correct field in your data. You can also exclude an expected field by providing an empty string for it in the overrides.

Since
100.0

◆ textVisibilityMaxScale

- (double) textVisibilityMaxScale
readwritenonatomicassign

The maximum scale (2D) or distance (3D) at which the symbol's text will be visible.

Since
100.0
Deprecated:
100.6.0. Use the AGSDictionarySymbolStyleConfiguration settings instead.

Provided by category AGSDictionaryRenderer(AGSDeprecated).

◆ textVisibilityMinScale

- (double) textVisibilityMinScale
readwritenonatomicassign

The minimum scale (2D) or distance (3D) at which the symbol's text will be visible.

Since
100.0
Deprecated:
100.6.0. Use the AGSDictionarySymbolStyleConfiguration settings instead.

Provided by category AGSDictionaryRenderer(AGSDeprecated).

◆ textVisible

- (BOOL) textVisible
readwritenonatomicassign

The visibility for the text on the symbol.

Since
100.0
Deprecated:
100.6.0. Use the AGSDictionarySymbolStyleConfiguration settings instead.

Provided by category AGSDictionaryRenderer(AGSDeprecated).

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100