Cannot hide graphic using graphic.visible with esri 4.8

08-09-2018 08:51 AM
New Contributor II

In 4.7 I was able to hide a graphic on the map by doing: graphic.visible = false; In 4.8 however this is not working. Can anyone help me with this?

0 Kudos
1 Reply
New Contributor II

I am also having issues with the graphic's visible property, in my case 2D. If a graphic is added to a GraphicsLayer with a visible value = false, the graphic is still displayed. There seems to be timing issue with setting the Graphics visible property as if it is done after a certain time, the graphic's visibility will match that of the visible property.

In this JS Bin example, the polygon's visible property is set to false but is still visible in 2D. The point graphic's visible property is toggled every second and this works in both 2D and 3D.

0 Kudos