Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support overzoom #53

Open
aptogo opened this issue Apr 18, 2016 · 7 comments
Open

Support overzoom #53

aptogo opened this issue Apr 18, 2016 · 7 comments

Comments

@aptogo
Copy link

aptogo commented Apr 18, 2016

I'm displaying vector tiles from a OSM mbtiles country extract using MapboxGL that has data up to zoom level 14. When I overzoom past the supported zoom level then I just see a blank map. Tessera is returning empty tiles rather than a '404 tile not found'.

It would be great if Tessera could respond with a 404 instead because this would allow you to zoom all the way in (albeit with reduced resolution).

@mojodna
Copy link
Owner

mojodna commented Apr 18, 2016

This is related to #49 / #51, but we didn't consider the overzoom angle.

@ramunasd can you weigh in?

@aptogo a workaround for you in the meantime is to install 0.8.x (which does return 404s): npm install tessera@~0.8.0

@aptogo
Copy link
Author

aptogo commented Apr 18, 2016

Thanks for the quick response. Just FYI Klokantech's tileserver-php returns 404s in this instance.

@ramunasd
Copy link
Contributor

@aptogo good catch, i will check this

@ramunasd
Copy link
Contributor

tiles outside allowed zoom range is served as 404 errors - https://github.com/mojodna/tessera/blob/master/lib/app.js#L161

@aptogo can You show your config? Does overzoom works only when maxzoom in tilejson is greater than actual?

@aptogo
Copy link
Author

aptogo commented Apr 19, 2016

I'm using this UK extract: https://osm2vectortiles-downloads.os.zhdk.cloud.switch.ch/v1.0/extracts/united_kingdom.mbtiles

and serving it using this command:
tessera mbtiles:///data/tileserver/www/united_kingdom.mbtiles -p 8899

The file has tiles covering the UK up to zoom 14 and the rest of the world up to about zoom 6-8 (varies on region). Hit the URLs below to see the results:
http://tileserver.emudataproducts.net/14/8185/5449.pbf UK zoom 14 - 200 response OK
http://tileserver.emudataproducts.net/15/16373/10897.pbf UK zoom 15 - no tile at this zoom but a 200 reponse is given with zero content length.

With tileserver-php a 404 response is given for the second URL and MapboxGL renders the map correctly at all zoom levels, ignoring the 404 responses and overzooming tiles to fill in the gaps.

@ramunasd
Copy link
Contributor

So, as i see, metadata is correct and mbtiles module returns correct info. The problem is in the way how tessera returns http status.

It needs to refactor a little bit callback function.

@steve9164
Copy link

This can be fixed by moving the logic for suppressing 404 errors into the code that identifies what the type of error is. See #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants