Open tordans opened 2 years ago
While this can be handy in any leaflet-based map, this would be especially handy in uMap maps, as the user-drawn contents might be smaller, closer to one another or more detailed than anything displayed on the background layer, so users might have to zoom in for both, editing and properly viewing these features. (E.g. when using uMap for mapping an indoor event location, with lots of temporary (event-specific) amenities that wouldn't themselves belong in OSM.) Yet, one would not want to only set maxZoom
higher without having the background layer's native max zoom treated as maxNativeZoom
, as a blurry background is still a better reference than no background at all.
In other words: this would allow to zoom lower than what the tiles usually allow (eg. for drawing something very accurately), and in this case the shown tiles are the max zoom one, scaled (so a bit blurry).
This is similar to https://github.com/umap-project/umap/issues/103, but for the values.
maxNativeZoom
https://leafletjs.com/reference.html#gridlayer-maxnativezoomminNativeZoom
They allow to set a maxZoom for the tiles (that is the "native" value) independent from the maxZoom for the viewer.
Example: