How to make view fit to entire height of the extent #15705
Unanswered
samuelchau
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a custom layer extent of [11, 55, 20, 70] which represents bbox with lower-left corner at lon=11E, lat=55N and upper-right corner lon=20E, lat=70N.
In the EPSG:4326 projection, this extent has its height larger than its width (ie. a "portrait" rectangular box, as opposed to a "landscape" one)
Whenever I make my map's view to fit to this extent, it will fit the entire 100% of the extent's width fully into the map container's width. (My map container is a "landscape" rectangle , i.e. width larger than its height.) while cutting top and bottom portions of the extent off the container. (I can still pan up and down to see those portions though)
But how can I make the view to fit to my extent so that it will fit the entire height(100%) of my extent into the map container's height (while leaving the white space on the two sides?
Is there any options I can pass to fit() to make this work? or any other way to do this?
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions