fitBounds with padding zooms the map really far out
See original GitHub issueI am not sure if this is a regression or not, but I have experienced that since the RC1 release the map fitBounds
function with padding
option does not work the same way as it worked before.
Some examples: Leaflet 0.7.5 http://playground-leaflet.rhcloud.com/niv/edit?html,output Leaflet 1.0.0-beta.2 http://playground-leaflet.rhcloud.com/jasi/edit?html,output Leaflet 1.0.0-rc.1 http://playground-leaflet.rhcloud.com/cipe/edit?html,output
The padding is just really big and the map is zoomed far out. We have used this function with the padding on layer containing SVG polygon also and since RC1 that also started to act strange by zooming the map really far out.
I can get the same result on RC1 by setting the padding
option on a point that is really small L.point(0.001, 0.001)
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (11 by maintainers)
Top GitHub Comments
Hi @eldamsheety, @aalsiuser and @qwertypool,
Thank you for your interest in Leaflet! Sorry for not getting back to you earlier.
There are many ways of contributing to this project, and to Open Source projects in general.
This thread is already closed, since the bug it describes has already been fixed in PR #4532. Avoid commenting on closed threads, as you may remain unnoticed, unless what you have to say is absolutely relevant to the thread (e.g. when the bug is actually not fixed). And even in that case, it is probably better opening a new issue and mentioning the closed thread.
As for contributing, you could have a look at threads with label “help wanted” and/or “good first issue”.
Keep up the good work and feel free to ask! 😄
I would love to do this! Thanks for the guide, I’ll follow it and let you know my results. 😄