Hi,
I have found that when loading an mmpk, the MinScale for the map is derived from the most restrictive layer. For example, if I have a map with 3 layers, with MinScales: 1:5,000, 1:24,000, and 1:0 (no scale restrictions), then the map gets a MinScale of 1:5,000. So then the MapView locks the user from zooming out beyond 1:5,000. MinScale indicates how far you can 'zoom out' before the layer disappears, so I would expect that in this case the MinScale of the map should be 0 (no scale restriction), since there is at least one layer visible at all scale ranges. I'm just guessing, but it appears that perhaps the Runtime is perhaps attempting to prevent the user from zooming out to a scale where no layer is visible? But if so, the logic seems to have been inverted. It works as expected for a webmap.
Here is an mmpk that can be used to test:
https://latitudegeo.maps.arcgis.com/home/item.html?id=9c03b622bff54de9a6fedae8a99df0f0
It contains 3 layers with the minscales mentioned above, 5000, 24000, and 0. The Map comes out with a MinScale of 5000.
Solved! Go to Solution.
Hello,
The runtime actually initializes this behavior (sets min scale / max scale https://developers.arcgis.com/net/wpf/sample-code/set-min-max-scale/) based on the first layer that it loads, which is typically the last layer in the map.
As a map creator you can get around this by ensuring that the "bottom layer" is visible at all scales.
Or as a runtime developer explicitly set the min and max scale.
With regard to your comment about the webmap working, I suspect you have a basemap that is visible at all scales?
Mark
Hello,
The runtime actually initializes this behavior (sets min scale / max scale https://developers.arcgis.com/net/wpf/sample-code/set-min-max-scale/) based on the first layer that it loads, which is typically the last layer in the map.
As a map creator you can get around this by ensuring that the "bottom layer" is visible at all scales.
Or as a runtime developer explicitly set the min and max scale.
With regard to your comment about the webmap working, I suspect you have a basemap that is visible at all scales?
Mark
Behavior works as advertised. Thanks Mark.