1ec5 left a comment (openstreetmap/openstreetmap-website#6504)
@imagico, did you zoom in or out before taking the screenshot (using either a
scroll wheel or two-finger trackpad gesture, as opposed to the ± buttons)? I
think this might be an artifact of smooth zooming (fractional zooming). Leaflet
has this capability too, but we never enabled it on this site.
By default, both libraries assume a raster tile layer is showing raster data
(i.e., aerial or satellite imagery), so they resolve the `zoom` in the tile URL
by rounding the current zoom level. This ensures the tiles are never over- or
underzoomed by more than half a zoom level. The alternative is to disable the
[`roundZoom`](https://maplibre.org/maplibre-gl-js/docs/API/classes/RasterTileSource/#roundzoom)
option, which would floor the zoom level, so the tiles will be overzoomed by
as much as one zoom level unless you set the zoom level precisely to an integer
using the ± buttons. There’s a diagram of the tradeoffs in
https://github.com/mapbox/mapbox-gl-js/issues/1030#issuecomment-76043779.
The other alternative would be to disable smooth zooming when viewing raster
tiles. MapLibre doesn’t have a built-in option for that, but there’s a
workaround in
https://github.com/maplibre/maplibre-gl-js/issues/1591#issuecomment-2748319483.
This could also be used to force a ceiling zoom strategy if desired.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6504#issuecomment-3656794942
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6504/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev