Select to view content in your preferred language

Renderer for scene view polylines

234
1
11-17-2022 03:06 PM
ararana
Emerging Contributor

Hi there! I can't seem to get this renderer working for polylines in a scene view. If I comment the renderer out it falls back on the default renderer and the object loads fine, but I'm trying to get a quad polyline loading with some height to it. 

Can anyone see what I might be missing on this one?

 

https://codepen.io/ararana/pen/poKdjQx

 

Thanks for any help!

0 Kudos
1 Reply
GreteSoosalu
Esri Contributor

Hi @ararana 

There are two things you should look into:

Firstly, the size of your PathSymbol3DLayer is too small to be visible in a global scale. Note that width and height properties are read in as meters, therefore, values such as 20000 would make more sense for your app. 

Secondly, in case of PathSymbol3DLayer, only the vertices are aligned to the ground. This means that with such long lines as you have, the Earth's curvature will hide most of the geometry. One way to overcome this is to add an offset to the layer's elevationInfo - this will lift the vertices off the ground. Note that the lines between the vertices remain straight, i.e. they won't follow the earth's curvature. 

Alternatively, you can automatically subdivide these lines into smaller segments with geodesicUtils.geodesicDensify() method, so that the resulting visuals follow the ground better. 

See an example in the codepen here: https://codepen.io/gsoosalu/pen/WNyMXGr

Hope this helps you further! 

 

0 Kudos