tilezen / tileserver

A lightweight tileserver to share code paths with tilequeue for tile generation.
MIT License
79 stars 27 forks source link

Enforce max zoom #47

Open rmarianski opened 7 years ago

rmarianski commented 7 years ago

Some requests for high zooms [1] end up producing overflows and generate errors [2]. Can we start enforcing a max zoom, and return 404s for zooms higher than that?

@nvkelso what would be reasonable? 20? 25?

[1] https://tile.mapzen.com/mapzen/vector/v1/all/9999/1/1.json [2]

File "/usr/local/lib/python2.7/dist-packages/tilequeue/tile.py", line 319, in calc_meters_per_pixel_dim (2 ** (zoom + 8))) | OverflowError: long int too large to convert to float
nvkelso commented 7 years ago

20

That's the max zoom we set in Leaflet for house styles and usage on 20 is very low:

https://cloud.githubusercontent.com/assets/853051/20083180/a9ebc9a4-a50f-11e6-9884-59a6f03b8c9b.png

nvkelso commented 7 years ago

(If someday we did indoor mapping tiles this might change, but overstuffing a zoom 18 or 20 tile would probably be fine.)