AnsweredAssumed Answered

I need to have all the features on a FeatureLayer Hidden

Question asked by mjpb.developer on Mar 17, 2020
Latest reply on Mar 19, 2020 by gyoung-esristaff

I have 2 featureLayer, one with "parent" elements and the second one with their "children". I'm trying that when i clic on a "parent" element the "children" in the other layer get shown.

 

I can´t use layer.setVisible(false), because then when i use layer.setFeatureVisible(feature, true) or   layer.setFeaturesVisible(features, true)  it does not work.

 

I have not found a way to set all the features in a layer hidden from the beginning.

 

I try to ask for all the features with a queryFeature an set all visible false but i have more than 50.000 features and layer.setFeatureVisible(feature, true) takse a lot of time to do it and  layer.setFeaturesVisible(features, true) collapse the app. And the reality its that i have not 2 but many layers. that i have to do the "parent childre" activated.

 

If anyone have an a idea on how to do it. Thanks!

Outcomes