I have a client side Layer [Feature Layer] and I like to set graphics visibility [visible = false/true] in the client side without using the DefinitionExpression.
Please let me know you anyone has any idea.
Thank you.
Have you tried looping through the graphics and setting the individual graphics visibility property?
I have tried to set visible property equals to false before insert all the features into the layer by using applyEdits but it does not work.
How can I get all the graphics?
in 3.x the layer contains array of graphics..
Thanks,
Roel
Have you tried to set the graphics visibility to false after they have inserted into the FL?
The only way to get the FLs graphics is to queryFeatures on the FL or the FeatureLayerView.
I have not try that yet, my only concern about that is the performance, I like to hide / show graphics very fast(Instantly).
I read this ticket, but I think set the definition expression is not fast enough according what I want..
https://community.esri.com/thread/195152-hideshow-graphic-with-43-api
Thanks,
Roel
Roel Garcia maybe a FeatureFilter would fit your use case? Example usage here: https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/index.html
Does anybody understand why the setting an individual feature's visible property to false will hide the feature in a Scene View, but not a Map View?