Open IvanSanchez opened 8 years ago
Thanks for noticing that, could be the root of many issues indeed.
So if you take in account the rotation of the map, the bounds will be larger than the non-rotated bounds. Is there not a risk of the latlngBounds being "clamped" to -90,90 / -180/180? Or maybe you have the same issue with leaflet at zoom 0/1? I need to have a closer look
Fabien
I don't think that'll be a problem, as the bounds can be left unwrapped (for the time being). i.e. a longitude range of [179, 181]
is perfectly fine, specially when [179, -179]
would cause problems.
I think that #2 is deeper than just
maxBounds
, and affectsmap.getBounds()
directly.Trying this code will show that the map bounds calculation is wrong, as it doesn't take into account the map center and/or rotation somehow: