You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the _resetView function is not being called, so the zoom level is the same as previous level after setZoom() and setMinZoom() but this.options.minZoom have been changed
when use called setMinZoom the zoom level should be set to max(current zoom, min zoom)
Not really.
When calling setMinZoom() or setZoom(), the expected behaviour is to start a zoom animation.
For technical reasons the animation starts at the next animation frame, and getZoom reports the current value instead of the desired value.
Note that your desired behaviour can be achieved when using the zoomAnimation map option with a value of false.
I do not think this is actionable. I'm also tempted to close this as a dupe of #4696 , which is meant to cover the issue of "current value" vs "desired value".
Checklist
Steps to reproduce
Expected behavior
when use called
setMinZoom
the zoom level should be set tomax(current zoom, min zoom)
Current behavior
Leaflet/src/map/Map.js
Line 174 in 56c1421
the
_resetView
function is not being called, so the zoom level is the same as previous level aftersetZoom()
andsetMinZoom()
butthis.options.minZoom
have been changedMinimal example reproducing the issue
https://plnkr.co/edit/lEWgKwR9hFuxcqQi?preview
Environment
The text was updated successfully, but these errors were encountered: