maplibre-gl-js
maplibre-gl-js copied to clipboard
Computed `pixelRatio` seems to be lower than ideal
maplibre-gl-js version: 2.3.0
browser: Vivaldi
Steps to Trigger Behavior
- show raster map with MapLibre
- show the same raster map with Leaflet
Link to Demonstration
Leaflet: https://www.freemap.sk/#map=14/48.660611/20.539885&layers=X
MapLibre: https://www.freemap.sk/~martin/hikingmap/#style=outdoor&lat=48.66061100&lng=20.53988500&zoom=13.00&bearing=0.00&pitch=0.00&3d=false
Note that you must have good eye to spot the difference, but it is there.
Expected Behavior
Maps should be equally sharp
Actual Behavior
MapLibre map is slightly blurred. Explicitly setting pixelRatio to higher value fixes it.
Animated gif to see the difference:

MapLibre:

Leaflet:

Just a side note, leaflet and maplibre uses a different zoom numbers (difference if 1 between them)
Also the link for local. Isn't working good. This is not the first time. Please use a different link like jsbin, stackblitz etc instead.
I apologize for the wrong link. I've fixed it.
Just a side note, leaflet and maplibre uses a different zoom numbers (difference if 1 between them)
Then https://github.com/maplibre/maplibre-gl-js/issues/1589 is probably invalid and I missed it in the doc.
In any case it does not affect this issue.