Created
March 6, 2023 13:19
-
-
Save RalucaNicola/1af2e0b1b0cff4f05fd9688deaf927c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// snow groomers | |
smoothGroomer.labelingInfo = [ | |
new LabelClass({ | |
labelExpressionInfo: { | |
expression: "$feature.name + TextFormatting.NewLine + '10.5mph'" | |
}, | |
labelPlacement: "above-center", | |
symbol: new LabelSymbol3D({ | |
symbolLayers: [ | |
new TextSymbol3DLayer({ | |
material: { | |
color: [241, 250, 237, 1] | |
}, | |
halo: { | |
color: [0, 0, 0, 0.2], | |
size: 0 | |
}, | |
font: { | |
size: 9, | |
//decoration: "underline", | |
weight: "bold", | |
family: '"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif' | |
}, | |
background: {color: [145, 219, 114, 0.8]} | |
}) | |
], | |
// verticalOffset: { | |
// screenLength: 20, | |
// maxWorldLength: 200, | |
// minWorldLength: 0 | |
// }, | |
// callout: { | |
// type: "line", | |
// size: 1.5, | |
// color: [241, 250, 237], | |
// border: { | |
// color: [0, 0, 0, 0] | |
// } | |
// } | |
}) | |
}) | |
]; | |
// water hydrants | |
require(["esri/layers/support/LabelClass", "esri/symbols/LabelSymbol3D", "esri/symbols/TextSymbol3DLayer"], (LabelClass, LabelSymbol3D, TextSymbol3DLayer) => { | |
view.map.findLayerById("1867883aab7-layer-123").labelsVisible = true; | |
view.map.findLayerById("1867883aab7-layer-123").labelingInfo = [ | |
new LabelClass({ | |
labelExpressionInfo: { | |
expression: "Replace($feature.Name_Nummer, 'Schacht', 'Hydrant') + TextFormatting.NewLine + FromCharCode(128313) + '150L/min'" | |
}, | |
labelPlacement: "above-center", | |
symbol: new LabelSymbol3D({ | |
symbolLayers: [ | |
new TextSymbol3DLayer({ | |
material: { | |
color: [250, 253, 255, 1] | |
}, | |
halo: { | |
color: [0, 0, 0, 0.2], | |
size: 0 | |
}, | |
font: { | |
size: 9, | |
weight: "bolder", | |
family: '"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif' | |
}, | |
background: {color: [255, 255, 255, 0.2]} | |
}) | |
], | |
verticalOffset: { | |
screenLength: 20, | |
maxWorldLength: 200, | |
minWorldLength: 0 | |
}, | |
callout: { | |
type: "line", | |
size: 0.75, | |
color: [255, 255, 255, 0.5], | |
border: { | |
color: [0, 0, 0, 0] | |
} | |
} | |
}) | |
}) | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment