out of visibility range layers do not grey out in the webapp builder layer list widget, can this be changed programmatically?
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"
Could it be that I am using the app from my C drive?
As soon as I open the layer list widget the zoom functionality goes haywire (zooming in will zoom out or go sideways)
Amy,
I have not seen the haywire zooming even when running an app from inside Web AppBuilder Developer (is that what you mean by running for your C drive?).
Sorry, yes running from inside web appbuilder
You have never zoom go berzerk? I developed an app from scratch and was having that problem. Thought it was some outside services not loading properly but when I changed from.........
layer1
layer2
layer3
addLayers (layer1, layer2, layer3)
to..........
layer1
add layers(layer1)
layer2
add layer(layer2)
layer3
add layer(layer3)
it solved the problem....... After weeks of head scratching and trying everything I could think of
This enhancement does not seem to work with WAB version 1.2. Looks like the code for the LayerListView.js has changed a bit compare to version 1.1.
On the initial load the Map Services seem to be grayed out appropriately but the sub-layers that are listed within the Map Service are all grayed out all of the time. Zooming in and out does not update what should be grayed out either.
Any chance that there is an updated version for this enhancement?
Regards
the newer version of LayerListView from 1.3 differs at line 175/176
ckSelect = new CheckBox({ | |
checked: layerInfo.isVisible(), //layerInfo.visible | |
'class': "visible-checkbox-" + layerInfo.id | |
}) |
does the newer syntax need to be added?
Robert-- Just plugged the 1.3 version in and noticing a small issue or two. One feature service in the map has 5 layers. All 5 layers have the same visibility extent setting. When zoomed to that scale, all the layers display on the map as they should, however two of them are greyed out as if not visible. I can still toggle them off and on and the map responds appropriately. I confirmed in ArcMap that the visible scales are the same for all layers. Any idea if this is something that needs fixed on my end?
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!
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!
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
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"