Hi. Unless it's there and I missed it while looking at the documentation, there doesn't appear to be a way to restrict the latitudes shown by the map. For example, perhaps I would like to prevent latitudes higher than 75°N or lower than 75°S being shown.
What I would like is for there to be a property for the maximum permitted latitude and a property for the minimum permitted latitude. The expected behaviour is:
- when the map initialises, the initial zoom level is chosen in such a way that it shows no latitudes north of the maximum permitted latitude and no latitudes south of the minimum permitted latitude
- when the user zooms out, the zoom is constrained so that it does not show latitudes north of the maximum permitted latitude or south of the minimum permitted latitude (if the max displayed latitude would be to the north of the max permitted, then zoom only far enough to show the max permitted - and similarly for the south)
- when the vertical height available to the map is increased (e.g. because the user maximised the window), zoom in if necessary to make sure disallowed latitudes aren't shown
- when the user pans, they can't pan to show latitudes that are too high or too low (if the user tries to pan north past the max permitted latitude, then the viewport continues to pan latitudinally according to the user's horizontal input, but won't pan any further north - and similarly for the south)
I note that a partial workaround exists, which is to enforce the max permitted latitude and min permitted latitude with calls to ZoomToCoordinates() in two places:
- the OnLoaded event handler
- the OnZoomComplete event handler - this one to be made only in the event that latitudes too high or too low are indicated by the MapZoomEventArgs. (Note, this must be in OnZoomComplete - not in OnZoom.)