Class ArcadeLabelExpression
The Arcade label expression must contain a syntactically correct Arcade script expression.
"State: " + $feature.State_Name
Note that quotes are needed around the literal text. See ArcGIS Arcade for full documentation on the Arcade scripting language and its function library.
Any Arcade functions allowed for the Labeling profile can be used in a label arcade expression. Other functions (for example, FeatureSet functions) are potentially too slow to be used in a dynamic label evaluation.
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.
- Since:
- 100.11.0
-
Constructor Summary
ConstructorDescriptionCreates a label arcade expression with an empty expression script.ArcadeLabelExpression
(ArcadeExpression arcadeExpression) Creates a label arcade expression object using theArcadeExpression.getExpression()
method.ArcadeLabelExpression
(String arcadeString) Creates a label arcade expression object with a specified Arcade expression script string. -
Method Summary
Methods inherited from class com.esri.arcgisruntime.mapping.labeling.LabelExpression
getExpression, setExpression
-
Constructor Details
-
ArcadeLabelExpression
public ArcadeLabelExpression()Creates a label arcade expression with an empty expression script.An empty script is a valid Arcade expression that will evaluate to an empty string.
- Since:
- 100.11.0
-
ArcadeLabelExpression
Creates a label arcade expression object using theArcadeExpression.getExpression()
method.Warning: Only the
ArcadeExpression.getExpression()
is used to construct the ArcadeLabelExpression. The other ArcadeExpression metadata properties are not used or stored.- Parameters:
arcadeExpression
- An ArcadeExpression containing the Arcade expression string to use. The expression is expected to be a complete, self-contained Arcade expression that calculates a text string.- Throws:
IllegalArgumentException
- if arcadeExpression is null- Since:
- 100.11.0
-
ArcadeLabelExpression
Creates a label arcade expression object with a specified Arcade expression script string. The expression is expected to be a complete, self-contained Arcade expression that calculates a text string.- Parameters:
arcadeString
- The Arcade expression script string. The expression is expected to be a complete, self-contained Arcade expression that calculates a text string.- Throws:
IllegalArgumentException
- if arcadeString is null- Since:
- 100.11.0
-