In the sample projects as well as the app I've been working on, I've noticed that I can drag past the viewable area of the map. It appears that I can drag the map so far as to place any of the four corners in the center point of the screen. If I enable wrap-around, it makes this unnoticeable in the horizontal plane, but it's still a problem in the vertical plane.
How do I limit the panning so the user can't drag past the edge of the map? So there aren't ever white bars around the actual map area?
I've been using the envelope that's specified by the included Bing Maps layer since my layer uses the same WKID. That envelope is basically -20037508.342 to 20037508.342 in both planes. That's not correct for the X plane since that projection doesn't go all the way to the poles, but it should be correct for the Y plane (since the total width of the map is approximately 40075016.704. And with those numbers it exhibits the problem I described.
Interestingly enough I noticed that if I used 1/2 of those numbers, it seemed to be correct. Is it possible that the way the limited panning works is that it's limiting the panning in a way that allows the user to pan so that the edge of the map is near the center point of the screen?
So is there a way to limit panning such the viewable screen area can never be panned past the edge of the map? The maxEnvelope property has to be the full size of the map, since if you set it to be smaller then you can pan correctly when zoomed in. But this means that you will be able to pan in such a way that there are white bars surrounding the map.
Is the only way to watch for this happening programmatically and telling the map view to snap back? Or is this already a feature I'm missing in the SDK?