Select to view content in your preferred language

LayerList 4.4 minScale/maxScale now ignored

2502
15
07-11-2017 04:03 AM
GertConradie
Occasional Contributor

Hi,

The Layerlist widget ignore the minScale/maxScale that one set on a Sublayer (of a MapImageLayer)

Sublayer minScale

So layers is not grayed out when out of scale (as is the case in version 4.3)

Any way to get around this? 

0 Kudos
15 Replies
UndralBatsukh
Esri Regular Contributor

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.

GertConradie
Occasional Contributor

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.

0 Kudos
NathanielRindlaub
New Contributor III

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nathaniel,

  Have you tried switching your API url to 4.7 to see if it has been fixed in the latest version?

0 Kudos
NathanielRindlaub
New Contributor III

Hey Robert!

Unfortunately, I have tried switching to 4.7 and I'm still experiencing the issue.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Must still be an issue then. Have you called tech support to report this?

0 Kudos
UndralBatsukh
Esri Regular Contributor

This issue described here is fixed and here is a simple test app. 

An Anonymous Pen on CodePen 

0 Kudos
NathanielRindlaub
New Contributor III

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? 

UndralBatsukh
Esri Regular Contributor

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,

0 Kudos