Scaling maps while preserving the same bounds and zoom level #706
-
Hello everyone, We are trying to add a feature that allows users to print an in-app map. Since the page on which it is to be printed might have a different size than the on-screen map, we need a way to scale the map while keeping the displayed information identical to what we show in-app. As such, we need a way to render a map at a different size, but with the same bounds and zoom level. Unfortunately, rendering the same bounds in a map with a different size changes the zoom level and thus the level of details. Rendering a map with the same center and zoom level at a different size causes the bounds to change. Scaling using CSS is also not an option, as the map becomes pixelated when scaling up. Is there a way to scale a map while keeping the same bounds and zoom level? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I had this functionally in my site a few years back, but very few people actually used the site for printing. So I removed it. No matter how much I tried it always looked bad :-) |
Beta Was this translation helpful? Give feedback.
-
This has been addressed with the new |
Beta Was this translation helpful? Give feedback.
This has been addressed with the new
Map#setPixelRatio
method added as part of #772.