out of visibility range layers do not grey out in the webapp builder layer list widget, can this be changed programmatically?
Solved! Go to Solution.
Robert and other users, so you are aware, don't use the ampersand symbol (&) in layer or group names.... this causes the layer or groups visibility toggle checkbox to appear as though the layer is always out of range (even if it is in range or no scale range is set on the layer) ie use "This and That" instead of "This & That". I suppose it is probably best practice to avoid such characters anyways as they probably muck up strings in code.
Thanks for posting the 2.0 Version Robert, it works great and I like the icons!
Robert, thanks so much for this enhancement to the layer list widget. As always, it is much appreciated.
The scale dependency enforcement at the group layer level is working however the layer list widget display makes it appear as if the layer can still be viewed or turned on/off. With so many layers in the LL, users are getting confused as to why they can't see the layer if it is turned on. Again, this more of a UI issue. The underlying logic is working well. If I remember correctly, this seemed to be the case with the flex viewer. The originating map maker could set the scale at the group level and the layer list would honor the display as well as the scale level.
To implement this in WAB, would the best approach be to pass the min scale from the parent layer ID to the sub layer ID min scale or is this a valid approach? If I am overlooking something obvious I apologize in advance.
Thanks again!
Emerson,
I am looking into it.
Thanks so much Robert for the fast turn around! I added the files to my app and unfortunately see the attached error. It looks as if the isInScale function isn't included in this iteration? Comparing the two side by side this looks to be the biggest difference. There are obviously others however this one was the most prominent.
Any help is greatly appreciated!
Emerson,
The latest version posted is for WAB 2.1 or greater. I seems you are using it in something older.
Oh...OK. Sorry about that Robert. I overlooked, "Here is a 2.1 version that addresses the issue". I will try to implement in 2.1. My apologies for the oversight.
emersonexp hi from up in Savannah again
Hey Kevin! Hope all is well my friend
Hello - wanted to check that the 2.1 fix works on 2.2 WAB before implementing, can anyone confirm? I realize it says 2.1 and later, but just want to double-check.
Thanks for the fix!