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

maxScaleFactor @4x and more does not work #1134

Closed EgorSaffrezzi closed 10 months ago

EgorSaffrezzi commented 10 months ago

maxScaleFactor does not work and does not generate tiles for suffix greater than @3x. But its correct work for @2x and @3x. Is there anything I might be missing or am I doing wrong?

DOCS:

maxScaleFactor
Maximum scale factor to allow in raster tile and static maps requests (e.g. @3x suffix). Also see maxSize below. Default value is 3, maximum 9.
image

My config file:

image image image
acalcutt commented 10 months ago

From the code it looks like if you set maxScaleFactor that it should go beyond 3x. I see you are setting it so not sure why that wouldn't work.

You can see here that it makes a render pool for each scale factor https://github.com/maptiler/tileserver-gl/blob/master/src/serve_rendered.js#L1230-L1242

And it is supposed to accept up to 9 scale factor (and default to 3) https://github.com/maptiler/tileserver-gl/blob/master/src/serve_rendered.js#L525

acalcutt commented 10 months ago

Looking at the example config vs your config, I think maybe you put 'maxScaleFactor' in the wrong place.

If you look at the example at https://maptiler-tileserver.readthedocs.io/en/latest/config.html#configuration-file , 'maxScaleFactor' is under options, but it looks to me like you have it outside options in your screenshot above.

EgorSaffrezzi commented 10 months ago

@acalcutt You are best. Thanks man !