Skip to content

Default map min_zoom of 5 - #19

Merged
dfguerrerom merged 1 commit into
mainfrom
feat/map-min-zoom
Jul 31, 2026
Merged

Default map min_zoom of 5#19
dfguerrerom merged 1 commit into
mainfrom
feat/map-min-zoom

Conversation

@dfguerrerom

Copy link
Copy Markdown
Contributor

Salvaged from the stale PR #11, which is being closed: its other two commits are already in main (chart theming landed with #13) or superseded (the Voila fix — pysepal 3.8.1 resolves the runtime under Voila itself, and the tile-client tweak is covered by the comm bridge from #16).

SepalMap never set min_zoom, so the map inherited ipyleaflet's 0. This floors zoom-out at level 5, overridable via the constructor.

Note the side effect: leaflet clamps the initial view up to minZoom, so with SepalMap's default center=[0,0], zoom=2 the app now opens at roughly 44 degrees across rather than a world view, and fit_bounds can't fit a raster wider than that.

Tests: 200 passed.

SepalMap never set min_zoom, so the map inherited ipyleaflet's 0. Floor
zoom-out at level 5, overridable via the constructor.
@dfguerrerom
dfguerrerom merged commit 77c529a into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant