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)
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.
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.
Thanks a lot, I'll note it down!
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!
@GreteSoosalu Sorry for the late response.
It does appear to be fixed for a single "plane" shaped polygon. Thanks!
Unfortunately, when you start to add some more shape to it, the fill disappears once again.
I've included the rings that I used for the broken example. Could it be that I'm defining the rings incorrectly?
[
[
[-104, 39, 5000],
[-104, 39, 10000],
[-104.75, 39.5, 10000],
[-105, 40, 10000],
[-105, 40, 5000],
[-104.75, 39.5, 5000],
[-104, 39, 5000]
]
]