/oss · 1 merged

Leaflet/Leaflet

The most used JavaScript library for interactive maps.

the project on GitHub (opens in a new tab)
  1. 8 Nov 2026

    Fitting a map with very large padding no longer zooms all the way in

    What was broken
    If the padding given to fitBounds was bigger than the map, the map jumped to its closest zoom instead of the widest one.
    What I changed
    When there is no room left after the padding, Leaflet now returns the widest zoom allowed.
    Why it matters
    A sidebar on a phone-width map, or a map in a hidden tab, no longer lands on a useless street-level view.

    see the code, #10544 (opens in a new tab)

← every project