AnsweredAssumed Answered

Web AppBuilder Layer-List Widget LayerInfos Events

Question asked by s.junggeosecure-de-esridist Employee on Jul 29, 2015
Latest reply on Nov 6, 2015 by yarn5961

Is there a reason why the Layer-List Widget is not listening to the 'layerInfosIsShowInMapChanged' Event provided by LayerInfos? Looks like the Layer-List Widget is expecting to be the only Widget that changes the visibility of layers.


I've developed a Widget (to group layers) that also affects the Layer visibility. The Widget is using 'setTopLayerVisible' like the Layer-List does, but the UI of the Layer-List Widget is not updating. The Legend Widget is listening to this Event like expected and is updating the legend for the visible layers.


To make it work it had to edit the 'LayerListView.js' of the Layer-List Widget. Listening to the 'layerInfosIsShowInMapChanged' Event and check/uncheck the checkboxes for the updated layer.


I did't find any other way, but i don't like the solution to update this widget. With the next version the Layer-List Widget might change and i have to update it again. The best solution would be if the Layer-List Widget would subscribe the event as it is.