layers out of range greyed out

13175
42
Jump to solution
07-01-2015 01:51 PM
AmyKlug
Occasional Contributor III

out of visibility range layers do not grey out in the webapp builder layer list widget, can this be changed programmatically?

42 Replies
StanMcShinsky
Occasional Contributor III

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

0 Kudos
MichaelPotter1
New Contributor III

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

All,

  Here is a 1.2 compatible version.

MichaelPotter1
New Contributor III

Excellent, thank you Robert.

Your efforts are greatly appreciated.

0 Kudos
SebastienPelletier
Occasional Contributor

Thank you for sharing. I discovered a problem with the scales at the opening, but adding this all works fine now.

startup: function () {
       
         this.checkScale ();
     },

EricMcPhee
New Contributor III

I added the startup function to LayerListView.js, but it doesn't appear to be getting hit when the panel opens like I thought it would. Did you add any other code to get this to work correctly?

0 Kudos
SebastienPelletier
Occasional Contributor

No sorry 😞

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Eric,

   Startup only gets called when the widget starts up. If you want something to fire when the widget opens then use onOpen function instead. Depending on your chosen theme the onOpen event may not get fired by the widget panel either.

by Anonymous User
Not applicable

I had to use startup. onOpen didn't work so I went with startup, works fine. I am on the default Foldable. Hope this helps. Thanks everyone.

0 Kudos
NartTamash
New Contributor III

Works a treat! Thanks Robert!

0 Kudos