AnsweredAssumed Answered

Group Filter widget set visible layers

Question asked by chricks on Jun 20, 2018
Latest reply on Oct 9, 2018 by lopes8@llnl.gov

The Group Filter widget sets all filtered layers to visible even if the layer in the web map was initially not visible.

 

In the Group Filter Widget.js, I commented out a line from the setupFilterToApply fuction:

 

//layer.layerObject.setVisibility(true); 

 

Now when i run the group filter the layers that are initially visible from the web map are shown. But, if I had gone into the layerlist widget and turned on and off different layers the group filter doesn't see what is currently visible.

 

Is there a way to tell what layers are currently visible in the web map? 

 

then i could something like:

if(layer.isCurrentlyVisible){

layer.layerObject.setVisibility(true); 

}

else{

layer.layerObject.setVisibility(false); 

}

Outcomes