Hi,
I'm trying to visualize roads in a 3d scene using PathSymbol3dLayer. The width of the road features are stored as a property/field on the features, so I want to use visualVariables so that the width of the symbol corresponds to the actual width of the road. However, when I do this with visualVariables I can only set "size" not "width". So when I set size both the width and the height of the path is set to the value stored on the feature. The result is that the object no longer looks flat like a road, but more like a building because the height is set.
Is it possible to only set width of pathsymbol3dlayer using visual variables? Alternatively, is there another way to do this?
Solved! Go to Solution.
Can be done using axis
https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVar...
renderer.visualVariables = [
new SizeVariable({ axis: "width", field: "width" }),
//or new SizeVariable({ axis: "width", valueExpression: "$feature.width*2" }),
new SizeVariable({ axis: "height", valueExpression: "1" })
];
Can be done using axis
https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVar...
renderer.visualVariables = [
new SizeVariable({ axis: "width", field: "width" }),
//or new SizeVariable({ axis: "width", valueExpression: "$feature.width*2" }),
new SizeVariable({ axis: "height", valueExpression: "1" })
];
Great, I had no idea this was possible! Thank you very much!