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 256 x 256 output tilesizes #9

Open
dnomadb opened this issue Jan 9, 2018 · 3 comments
Open

Support 256 x 256 output tilesizes #9

dnomadb opened this issue Jan 9, 2018 · 3 comments

Comments

@dnomadb
Copy link
Contributor

dnomadb commented Jan 9, 2018

In order to more easily stay under total and individual (tile) size limits, we should allow creation of mbtiles with 256x256 tiles in addition to 512x512.

@jingsam
Copy link

jingsam commented Jan 10, 2018

Note that mapbox.terrain-rgb uses 256.

@dnomadb
Copy link
Contributor Author

dnomadb commented Jan 10, 2018

Note that mapbox.terrain-rgb uses 256.

While the default tile endpoint is indeed 256, the full size tiles (@2x) are retina resolution at 512x512 (same for all of our raster tiles: https://www.mapbox.com/api-documentation/#retrieve-tiles -- they are resized on-the-fly).

512: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/793@2x.pngraw?access_token=<token>

image

256: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/793.pngraw?access_token=<token>

image

I'd guess that for hillshading 512 is overkill, but 512 tiles work great for other uses in order to make fewer calls to the api, eg: https://www.mapbox.com/labs/terra/#15.1541/-25.3483/131.0368/31.8413/36

@jingsam
Copy link

jingsam commented Jan 11, 2018

I think the default tileSize should be 512. As mapbox-gl-js uses 512 tiles, a 256 tile source would cause mapbox-gl-js request four 256-based tiles to compose a 512 tile. Not only more requests, but also the total size of tiles increase.

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

2 participants