AnsweredAssumed Answered

The DynamicLayerInfo.MinScale is not honored correctly by the ArcGISDynamicMapServiceLayer

Question asked by epaitz-esristaff Employee on Dec 13, 2016

I have an ArcGISDynamicMapServiceLayer with one DynamicLayerInfo that has its MinScale set. When I zoom the MapView to the same exact scale as the DynamicLayerInfo.MinScale I do not see the layer draw. If I zoom the MapView to a number a little smaller than the DynamicLayerInfo.MinScale then the layer draws.


I have attached a sample project that contains an ArcGISDynamicMapServiceLayer with oneDynamicLayerInfo that has its MinScale set to 5,000,000. There are two buttons at the top of the Window where one button zooms to exactly 1:5,000,000 and a second button that zooms the map to 1:4,979,000. The layer will not draw unless the map scale is a little smaller that 1:5,000,000.

 

I did a little more digging and from what I can tell the map scale that is calculated internally by the ArcGISDynamicMapServiceLayer does not seem to be accurate enough. The map scale value that is calculated by the internal/private method GetScale (I think that is what its called) is a little larger than the true MapView.Scale. Thus you have to zoom in at least that much under the DynamicMapLayerInfo.MinScale before the layer will draw.

 

Can someone please confirm my findings and offer a solution?

 

Thanks,

   -eric

Attachments

Outcomes