LabelDefinition

constructor(labelExpression: LabelExpression, textSymbol: TextSymbol?)

Creates a LabelDefinition with the specified LabelExpression and com.arcgismaps.mapping.symbology.TextSymbol. The label expression may be a combination of literal text and attribute values from the feature being labeled. The syntax of the expression is determined by which label expression object is used: ArcadeLabelExpression, SimpleLabelExpression or WebmapLabelExpression. Warning: If the expression attempts to use attributes which don't exist then no label will be produced. This is distinct from the attribute existing but having a null or empty value, which can form part of the produced text label.

If no LabelDefinition.textSymbol has been set, then no labels can be created.

Since

200.1.0

Parameters

labelExpression

The expression script used to calculate the label text.

textSymbol

The text symbol which describes the overall appearance of label text (e.g. font and size).