ArcGIS Runtime SDK for iOS: AGSLabelingInfo Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSLabelingInfo Class Reference

Description

An object that defines the text, appearance and position of labels for features for a given scale range. An AGSLabelingInfo describes a class of labels.

Each AGSLabelingInfo specifies:

Inheritance diagram for AGSLabelingInfo:
AGSObject

Properties

NSString * labelExpression
 
AGSLabelingPlacement labelPlacement
 
double maxScale
 
double minScale
 
AGSSymbolsymbol
 
BOOL useCodedValues
 
NSString * where
 

Property Documentation

◆ labelExpression

- (NSString*) labelExpression
readnonatomiccopy

Simple expression describing how to build the text label for a feature, often using attributes of the feature. The default is an empty expression and no labels will be produced.

The Simple expression format is described at https://developers.arcgis.com/documentation/common-data-types/labeling-objects.htm e.g. "\"Addr: " CONCAT [Name] CONCAT " Street"" (the outer quotes are not part of the expression, but quotes are needed around the literal text).

Since
100

◆ labelPlacement

- (AGSLabelingPlacement) labelPlacement
readnonatomicassign

The preferred position of the text label, with respect to its feature geometry.

The default depends on the type of feature geometry:

  • AGSLabelingPlacementPointAboveRight for point features
  • AGSLabelingPlacementPolygonAlwaysHorizontal for polygon features
  • AGSLabelingPlacementLineAboveAlong for line features
    Since
    100

◆ maxScale

- (double) maxScale
readnonatomicassign

Labels will only be visible when the viewing scale is smaller than (or equal to) the maxScale. For example, if the viewing scale is 1:12000 and the AGSLabelingInfo::maxScale is 1:10000, then the labels will be visible (because 1/12000 <= 1/10000).

An AGSLabelingInfo::maxScale of 0, which is the default, indicates no upper limit on the viewing scale.

Since
100

◆ minScale

- (double) minScale
readnonatomicassign

Labels will only be visible when the viewing scale is larger than (or equal to) the minScale. For example, if the viewing scale is 1:12000 and the AGSLabelingInfo::minScale is 1:20000, then the labels will be visible (because 1/12000 >= 1/20000).

An AGSLabelingInfo::minScale of 0, which is the default, indicates no lower limit on the viewing scale.

Since
100

◆ symbol

- (AGSSymbol*) symbol
readnonatomicstrong

The text symbol which describes the overall appearance of label text (e.g. font and size). If no AGSLabelingInfo::symbol has been set, then no labels can be created.

Since
100

◆ useCodedValues

- (BOOL) useCodedValues
readnonatomicassign

Whether the data source should translate domain identifiers into meanings using an AGSCodedValueDomain. For any translation to occur, the data source must have one or more AGSCodedValueDomain set up for the attribute fields.

The default value is NO i.e. no translation will be done.

Since
100

◆ where

- (NSString*) where
readnonatomiccopy

Limit the set of features for which labels will be generated and placed. For example, "[address] LIKE '% Danube %'" labels all features with an address attribute that contains the string " Danube ". This is a SQL expression that can refer to the attributes of the feature e.g.

  • "" (no limitations)
  • "NAME LIKE 'A%'" (Only label features with NAME attribute values starting with 'A')
  • "(LENGTH > CAPACITY) and (TYPE = 1)" (Only label features whose attributes satisfy the SQL condition)

The default value is "".

Since
100