out of visibility range layers do not grey out in the webapp builder layer list widget, can this be changed programmatically?
Amy,
This took a little work, but it was something I wanted for my site as well so here it is. Just take the attached file and overwrite the one you have in your stemapp and/or apps folder(s) "widgets\LayerList\LayerListView.js"
Michael,
I did notice that even on my site but I have not been able to track the issue down.
Hi All,
Anyone else having an issue with the Layer List widget in WAB 2.1 where tiled Map Services are still greyed-out when you reach the first scale level that the layer becomes visible? Once you zoom in one more level the layer is no longer greyed-out as it should be. This does not seem to be an issue in previous releases and I still see the issue in WAB 2.2.
I checked the visible scale ranges for all of my Map Services and they are all setup appropriately.
Dynamic Map Services work fine.
Regards,
Michael
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.
Emerson,
The latest version posted is for WAB 2.1 or greater. I seems you are using it in something older.
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!
All,
Here is a 2.1 version that addresses the issue that Emerson brought up above:
I am looking into it.
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!
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!
Here is the 2.0 version with a more ArcMap like feel to it (i.e the scale image on the checkbox).
works in 1.2. PERFECT.
I have used IE version 11 and chrome 43.0.2357.130 m & same problem
Thanks Robert it works great. This will be very helpful for my users so I don't have to explain why something is not showing up and that they might have to just zoom in a little bit.
-Stan
What browser are you using? I tested in Firefox 38.05 & 39, IE 11, and Chrome 43.
I think I spoke too soon. Are you having trouble zooming in and out with the layer list expanded?
Perfect! Thanks
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.