Select to view content in your preferred language

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

790
0
03-25-2021 05:13 PM
avecchi
Emerging Contributor

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)

 

Am I missing something?

Thank you

 

0 Kudos
0 Replies