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.
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?
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
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
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 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..
Have you tried looping through the graphics and setting the individual graphics visibility property?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.