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

PM-Tiles vs PBF-Tiles Comparison #972

Open
koufopoulosf opened this issue Jun 4, 2023 · 2 comments
Open

PM-Tiles vs PBF-Tiles Comparison #972

koufopoulosf opened this issue Jun 4, 2023 · 2 comments

Comments

@koufopoulosf
Copy link

Hello all,

I am making this issue, as I would like your valuable opinion on the following matter.

So far, for making a basemap (not relying on a 3rd party API), we have to worry about provisioning a server, scaling it, maintaning it, and all the fun that comes with it (like in the case of MBTiles). However, there are two alternative ways, that I would consider.

One is to use protomaps, the so called PMTiles, which essentially is a simple blob that the frontend will download (only desired parts) and render directly in the browser.

The other suggestion would be to use tippecanoe with the --output-to-directory flag to output the individual .pbf tiles instead of a single MBTiles file. These tiles can then be hosted on something like S3 and your map-rendering client can query the necessary tiles, no server required.

So my question would be:

Has anyone experience with both of these methods for deploying a scalable basemap and/or is there any other suggestion that could be considered efficient in terms of serving a basemap without the need of a server?

Thanks in advance for your valuable time.

Best Regards,

Filippos

@e-n-f
Copy link
Contributor

e-n-f commented Jun 6, 2023

The tradeoff is that storing tiles to individual S3 files can be very slow, but access to them once they are stored is very fast; storing an archive of tiles as a single file on S3 is very fast but access to tiles from that archive is then somewhat slower.

Mapbox stores tiles as individual files on S3. Felt stores a single pmtiles file on S3 and uses an AWS lambda to serve tiles from that archive using range requests.

@koufopoulosf
Copy link
Author

koufopoulosf commented Jun 6, 2023

@e-n-f Thanks for your detailed reply! I was wondering, can we make user download the map locally on his phone/or web browser cache and never have to access them again from our webserver / S3 / tileserver / whatever? I am really interested in such a solution. I mean, the PMTiles size I have is ~350MB, so if it was a mobile app, it would be a normal sized app.

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