Select to view content in your preferred language

Set PathSymbol3dLayer width only (not height) using visualVariables

166
2
Jump to solution
10-07-2024 01:43 AM
ae
by
Frequent Contributor

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? 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
AndreasUlmer
Esri Contributor

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" })
  ];

 

 

 

View solution in original post

0 Kudos
2 Replies
AndreasUlmer
Esri Contributor

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" })
  ];

 

 

 

0 Kudos
ae
by
Frequent Contributor

Great, I had no idea this was possible! Thank you very much! 

0 Kudos