AnsweredAssumed Answered

Max/Min Scale not set on SubLayers?

Question asked by JKingesriaustralia-com-au-esridist Employee on Mar 9, 2017
Latest reply on Apr 20, 2017 by ESoekianto-esristaff

Hey All,

 

Just wondering if anyone else has noticed this and if this is 'intended' behaviour..

 

I'm working with the 4.3 API and have noticed, if you add a MapImageLayer to your map, which has scale limits set on the sublayer (e.g. http://<yourarcgisserver>:6080/arcgis/rest/services/<yourMapServer>/0), these scale limits do not appear to populate as properties on the sublayer. By this I mean that the subLayer.minScale and subLayer.maxScale are there, but both are set to zero, even though they are not zero in the service. Although, the layer does still adhere to the set scale limits in the map. Here's an example of the properties I am talking about, these are on the only sublayer of my Map Service;

 

 

I can override those values using subLayer.minScale = blah and it will set the property and enforce it. But I was expecting it to populate itself with the values from the Map Service, which could then be overridden programatically to new values if desired.

 

As I mentioned above, even though they are set to zero, the min and max scale are still enforced in the map when zooming, but I'm guessing this is the Map Server sending back the images, not the dynamic layers. Also, as an FYI - we would like to use these values to set a zoom to layer button, when the layer is outside of the scale ranges.

 

To achieve this in the 3x API's, we used to use the layerInfos property, which did set the min/max scale values from the Map Service.

 

 

Cheers,

Jordan

Outcomes