Skip to content

Commit 047fce2

Browse files
Rachael-ERachael Ellen
andauthored
Use new constructor for label definition (#628)
* use new constructor for label definition * remove setting of text symbol Co-authored-by: Rachael Ellen <[email protected]>
1 parent 6d09cb7 commit 047fce2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scene/show-labels-on-layer-in-3d/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
group = 'com.esri.samples'
77

88
ext {
9-
arcgisVersion = '100.11.0-3064'
9+
arcgisVersion = '100.11.0-3098'
1010
}
1111

1212
javafx {

scene/show-labels-on-layer-in-3d/src/main/java/com/esri/samples/show_labels_on_layer_in_3d/ShowLabelsOnLayerIn3dSample.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ public void start(Stage stage) {
9595
textSymbol.setHaloColor(ColorUtil.colorToArgb(Color.WHITE));
9696
textSymbol.setHaloWidth(2);
9797
textSymbol.setSize(16);
98+
9899
// create a label definition with an Arcade expression script
99-
var labelDefinition = new LabelDefinition();
100-
labelDefinition.setExpression(
101-
new ArcadeLabelExpression("Text($feature.INSTALLATIONDATE, `DD MMM YY`)"));
100+
var arcadeLabelExpression = new ArcadeLabelExpression("Text($feature.INSTALLATIONDATE, `DD MMM YY`)");
101+
102+
var labelDefinition = new LabelDefinition(arcadeLabelExpression, textSymbol);
102103
labelDefinition.setPlacement(LabelingPlacement.LINE_ABOVE_ALONG);
103104
labelDefinition.setUseCodedValues(true);
104-
labelDefinition.setTextSymbol(textSymbol);
105105

106106
// add the label definition to the feature layer
107107
featureLayer.getLabelDefinitions().add(labelDefinition);

0 commit comments

Comments
 (0)