Select to view content in your preferred language

MMPK MinScale weirdness

1070
2
Jump to solution
04-09-2021 01:38 PM
JeffSiemens
Emerging Contributor

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.

0 Kudos
1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

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.

MarkBockenhauer_0-1618005561659.png

 

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

 

 

View solution in original post

2 Replies
MarkBockenhauer
Esri Regular Contributor

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.

MarkBockenhauer_0-1618005561659.png

 

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

 

 

JeffSiemens
Emerging Contributor

Behavior works as advertised. Thanks Mark.

0 Kudos