Select to view content in your preferred language

Polygon symbol SceneView: no fill when points are directly on top of each other

2184
4
12-16-2022 08:31 AM
avecchi
New Contributor II

Hello,
I am trying to render a vertical polygon (essentially a wall) in a SceneView and I am following this tutorial:
https://developers.arcgis.com/javascript/latest/sample-code/graphics-basic-3d/

For some reason, when the points are directly on top of each other, the fill of the polygon disappears but the outline remains. Here is the code that is rendering the polygon:

const polygon = {
  type: 'polygon',
  rings: [
    [-104.95, 39.72, 5000],
    [-104.945, 39.725, 5000],
    [-104.945, 39.725, 8000],
    [-104.95, 39.72, 8000],
    [-104.95, 39.72, 5000]
  ]
}

const fillSymbol = {
  type: 'simple-fill',
  color: [227, 139, 79, 0.8],
  outline: {
    color: [255, 255, 255],
    width: 1
  }
}

const polygonGraphic = new Graphic({
  geometry: polygon,
  symbol: fillSymbol
})

graphicsLayer.add(polygonGraphic)
0 Kudos
4 Replies
GreteSoosalu
Esri Contributor

Hi @avecchi, unfortunately, this is a current limitation and in our backlog.

Could you please explain a bit more the use case and how you would use such vertical polygons/walls? This can help us to prioritize since solving all possible cases is not trivial in 3D.

0 Kudos
avecchi
New Contributor II

I'm displaying flight paths in 3D with lines and it's difficult to judge the altitude without something filling in the area below the line. Right now, I'm drawing vertical lines below every point on the flight path line to show the altitude but I feel like that is not a very performant way of handling this. 

If you plot a line in a KML and open it in Google Earth, it will fill in the area below the line to show the altitude a little better. I was trying to do something similar. I have attached an image to give you a better idea of what I'm trying to do.

0 Kudos
GreteSoosalu
Esri Contributor

Thanks a lot, I'll note it down! 

0 Kudos
GreteSoosalu
Esri Contributor

Hi @avecchi 

We've installed a fix for the upcoming 4.28 release that goes out this October. 
Let us know if you still run into any issues! 

0 Kudos