Skip to content

Instantly share code, notes, and snippets.

@RalucaNicola
Last active July 30, 2019 11:28
Show Gist options
  • Save RalucaNicola/1159d88d1d8a29febe9ce319f7f3e177 to your computer and use it in GitHub Desktop.
Save RalucaNicola/1159d88d1d8a29febe9ce319f7f3e177 to your computer and use it in GitHub Desktop.
const contourLayer = new FeatureLayer({
url: "https://services2.arcgis.com/cFEFS0EWrhfDeVw9/arcgis/rest/services/ContourLinesZurichDemo/FeatureServer",
elevationInfo: {
mode: "absolute-height",
featureExpressionInfo: {
expression: "Pow($feature.elevation,1.2)"
}
},
renderer: {
type: "simple",
symbol: {
type: "line-3d",
symbolLayers: [{
type: "line",
size: "1px",
material: {
color: [86, 72, 31]
}
}]
},
visualVariables: [{
type: 'opacity',
field: 'elevation',
stops: [{
value: 400,
opacity: 0.3
}, {
value: 800,
opacity: 0.9
}]
}]
}
});
webscene.add(contourLayer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment