Select to view content in your preferred language

Web AppBuilder Layer-List Widget LayerInfos Events

3301
1
07-29-2015 11:40 PM
StefanP__Jung
Deactivated User

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.

1 Reply
DavidYarnell
Occasional Contributor

I have a similar issue. any chance you could post that code?