maptiler / tileserver-gl

Vector and raster maps with GL styles. Server side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
https://tileserver.readthedocs.io/en/latest/
Other
2.24k stars 639 forks source link

Static map image files renders with slightly different/wrong zoom #167

Open denkan opened 7 years ago

denkan commented 7 years ago

I'm rendering static images based on web ui map and have encountered a minor difference between the renderings: the zoom level seems to differ by 1

I'm using docker image klokantech/tileserver-gl:v1.7.0.

Feel free to check out the following screendumps which demonstrates the behavior:

Web UI (mapbox-gl) with zoom 12: Web UI with zoom 12 Static file with zoom 12 – wrong: Static file with zoom 12 – wrong! Static file with altered zoom to 13 – correct: Static file with altered zoom to 13 – correct!

petrsloup commented 7 years ago

The mapbox-gl-native (rasterization backend) uses 512x512 tiles, so the zoom level numbering is off by 1 (as compared to the "traditional" 256x256 tiles).

denkan commented 7 years ago

@petrsloup Oh, so that's expected behavior when using mapbox-gl.js on frontend?

Simple enough to adjust the zoom level to the static image url, I just want to confirm that this is a correct observation and as expected.

muesliq commented 6 years ago

@denkan See https://github.com/mapbox/mapbox-gl-js/issues/685 for explanations. Raster zoom level 13 = vector zoom level 12. There is always an offset of 1 between raster and vector.

This issue should be closed.