Arcgis JS API Version - 4.26.
I have created a feature layer which show polygon feature. The polygons are drawn on the map alright but when I zoom in little some weird boxes starts to show in the middle of the polygons. Attached the screenshot.
Also, if I click on the empty area inside the polygon the hittest also do not return that feature in the result.
VickyR_0-1692956128404.png
Is there any way to fix this? Added my code below.
Solved! Go to Solution.
I changed the geometry type from "polyline" to "polygon" and it fixed the issue.
The issue is you are trying to use a simple-fill renderer (for polygons) on polyline features. You can change it to simple-line and it will work as expected.
https://codepen.io/odoe/pen/gOZaXGx?editors=1000
renderer: {
type: 'simple',
symbol: {
type: 'simple-line',
color: [179, 5, 5],
style: "solid",
width: 2,
}
}
@ReneRubalcava Thanks for the quick response!
Actually, I want to show these polygons with different colors as show in the example. With simple-line renderer I want be able to do it.
I changed the geometry type from "polyline" to "polygon" and it fixed the issue.