Class ArcadeLabelExpression
- java.lang.Object
-
- com.esri.arcgisruntime.mapping.labeling.LabelExpression
-
- com.esri.arcgisruntime.mapping.labeling.ArcadeLabelExpression
-
public final class ArcadeLabelExpression extends LabelExpression
An expression script using the Arcade language.The Aracade label expression must contain a syntactically correct Arcade script expression.
"State: " + $feature.State_Name
Note that quotes are needed around the literal text. See https://developers.arcgis.com/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.
- Since:
- 100.11.0
-
-
Constructor Summary
Constructors Constructor Description ArcadeLabelExpression()
Creates a label arcade expression with an empty expression script.ArcadeLabelExpression(ArcadeExpression arcadeExpression)
Creates a label arcade expression object using theArcadeExpression.getExpression()
method.ArcadeLabelExpression(java.lang.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 Detail
-
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
public ArcadeLabelExpression(ArcadeExpression arcadeExpression)
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:
java.lang.IllegalArgumentException
- if arcadeExpression is null- Since:
- 100.11.0
-
ArcadeLabelExpression
public ArcadeLabelExpression(java.lang.String arcadeString)
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:
java.lang.IllegalArgumentException
- if arcadeString is null- Since:
- 100.11.0
-
-