Hi,
The Layerlist widget ignore the minScale/maxScale that one set on a Sublayer (of a MapImageLayer)
So layers is not grayed out when out of scale (as is the case in version 4.3)
Any way to get around this?
Hi Gert,
I am able to reproduce the issue you reported. This issue will be fixed in our next release. I do not have a workaround at this time. Thank you for reporting this issue.
Thanks Undral.
I use a customized version of the LayerList.tsx on GitHub, so were able to add a custom 'visibleAtCurrentScale' method as an interim fix/workaround to replace the 'item.visibleAtCurrentScale' (that have the bug).
For what it is worth - it seems the bug is in the 'isLayerOutsideScaleRange' function of "./support/layerListUtils" that might receive incorrect parameters, but I might be be wrong - it get tricky to read trough the obfuscated code.
Hey there,
I'm on 4.6 and am still experiencing this issue. Did the bug ever get addressed? If not, any guidance on a non-typescript work around would be much appreciated!
Best,
Nathaniel
Nathaniel,
Have you tried switching your API url to 4.7 to see if it has been fixed in the latest version?
Hey Robert!
Unfortunately, I have tried switching to 4.7 and I'm still experiencing the issue.
Must still be an issue then. Have you called tech support to report this?
This issue described here is fixed and here is a simple test app.
Ah, you're right Undral, if I set the max/min Scale on the sublayer manually when I request the MapImageLayer the app does respect them and the layers get gray-ed out appropriately.
However, the sublayer does not seem to automatically retrieve and respect the default max and min scales set on the endpoint (e.g., Layer: Flowlines (ID: 0) ).
Is that expected behavior?
Hi there,
I could be missing the point you are making. Can you please take a look at this app? LayerList is behaving as expected from what I see: https://codepen.io/anon/pen/zjxRaP?editors=1000
The layers become visible at scale 288895.277144 and larger scales. Greyed out otherwise. The min scale for the your layers are specified as Min Scale: 288896.
Can you please give me a simple reproducible case? Thank you,