cmndrbensisko / LocalLayer

The LocalLayer Widget for ArcGIS Web AppBuilder is intended to allow the direct addition of ArcGIS for Server Mapservices to an ArcGIS Web AppBuilder application, without needing to wrap the desired services in an ArcGIS Online/Portal Web Map.
MIT License
55 stars 26 forks source link

Possible bug in toggling lowest ranked Layer List layers #56

Open AdrianCT opened 8 years ago

AdrianCT commented 8 years ago

Hi, thanks for developing this widget. I've recently had an issue with clicking the toggle boxes for the lowest ranked group layers in the Layer List of my web app, so in a layer list structure like this:

When trying to toggle sub layers 3a and 3b (the lowest ranked layers), there's no response in the check box on or off when selected. The layer disappears when toggling 3b off, if it's visible upon first page load however the user is unable to have it appear again without reloading.

slead commented 7 years ago

I have exactly the same issue.

It's really hard to debug as there is no error thrown - the checkbox simply fails to respond. Looking at the DOM elements, I can't see any obvious difference between a layer which works and a layer which fails.

A quick workaround is to add a "dummy" layer below the last layer that you need to use - after this the checkbox magically works for the second-last layer.

slead commented 7 years ago

I wonder if this is related? Steps to reproduce:

Note that one layer remains in the Layer List widget:

ll widget

This layer is removed if you hit Save then reload the map, but could there be a bug somewhere which is causing a "phantom" layer to persist, and which manifests itself as a layer which doesn't obey the Layer List widget controls?