Skip to content

Instantly share code, notes, and snippets.

@RalucaNicola
Created July 30, 2019 11:59
Show Gist options
  • Save RalucaNicola/589478248bfe2e83f9335b480643a69e to your computer and use it in GitHub Desktop.
Save RalucaNicola/589478248bfe2e83f9335b480643a69e to your computer and use it in GitHub Desktop.
const hillsLayer = new FeatureLayer({
url: "https://services2.arcgis.com/cFEFS0EWrhfDeVw9/arcgis/rest/services/HillsZurichDemo/FeatureServer",
elevationInfo: {
mode: "absolute-height",
featureExpressionInfo: {
expression: "Pow(Geometry($feature).Z, 1.2)"
}
},
renderer: {
type: "simple",
symbol: {
type: "point-3d",
symbolLayers: [{
type: "icon",
resource: {
primitive: "circle"
},
material: {
color: [86, 72, 31]
},
size: "4px"
}]
}
},
labelingInfo: [{
labelPlacement: "above-center",
labelExpressionInfo: {
expression: "$feature.NAME"
},
symbol: {
type: "label-3d",
symbolLayers: [{
type: "text",
material: {
color: [86, 72, 31]
},
halo: {
color: [244, 239, 227, 0.6],
size: "3px"
},
font: {
weight: "bold"
},
size: 10
}],
verticalOffset: {
screenLength: 50,
maxWorldLength: 1000,
minWorldLength: 20
},
callout: {
type: "line",
size: "2px",
color: [86, 72, 31]
}
}
}]
});
webscene.add(hillsLayer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment