Hi all,
I am using Robert esearch widget which is really good! I am trying to find the way when the Search will apply in esearch widget all other layers turn off by self, only data from esearch layer (results) should display on map. Right now I have layer toggle button widget which is doing this job manually. Any idea?
Thanks,
Irfan Afsar
Ifran,
If you are just wanting to turn all other layers in the map off then you can do this:
_onSearchFinish: function (layerIndex, closeOnComplete, removing, adding, results) {
array.forEach(this.operLayerInfos.getLayerInfoArray(), function(layerInfo2) {
if(layerInfo2._visible){
layerInfo2.setTopLayerVisible(false);
}
});
...