feat: Add ability to control the max zoom of the map (#2201)

- Resolves #2202

## Launch Checklist

The map max zoom was increased to 24 without the ability to change it.
- https://github.com/maplibre/maputnik/issues/593

The default is 22 for all maplibre instances if you don't override it in
your code.
The zoom levels to over scale is dependent on max zoom, which can affect
how the map looks.
This PR adds the ability to change this.
This was added to the debug dialog:
<img width="446" height="446" alt="image"
src="https://github.com/user-attachments/assets/ea68c392-309f-4476-8922-790670762d56"
/>


 - [x] Briefly describe the changes in this PR.
 - [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
This commit is contained in:
Harel M
2026-10-05 15:49:55 +03:00
committed by GitHub
parent e172e6c6fc
commit 68c81fc7a3
5 changed files with 59 additions and 12 deletions
+1
View File
@@ -7,6 +7,7 @@
- Exported HTML now loads MapLibre GL JS as an ES module, since v6 no longer ships a UMD bundle
- Add `font-faces`, `sky`, `roll` and `centerAltitude` to the style settings modal
- The sidebar can now be resized, both as a whole and in the split between the layer list and the layer editor
- Allow viewing and changing the map's max zoom in the debug modal
- _...Add new stuff here..._
### 🐞 Bug fixes