2

I have downloaded maps covering Europe from OpenMapTiles. I want to use these .mbtile files (vector tiles) in a web application made with Leaflet or Mapbox.

How do I have to serve the .mbtile files so that I can use them in a web application? Do I need to serve them via GeoServer, TileServer? Or can I store the file locally and use this file?

the_chimp
  • 205
  • 4
  • 18

1 Answers1

7

As far as I found, there are two ways:

  • Openmaptiles tiles server that will server tiles generated on the fly from the mbutils. You'll need either a backend to run the tile server, or you can do it with serverless.

  • Using mapbox mbutils to generate the Openlayers directory structure with x y and z. Mbutils is very easy to use, takes a .mbtile file and output the folder directory that you will be able whereever you want, like a AWS S3 bucket, served by AWS Cloudfront. Just be careful, when generating tiles from openmaptiles mbtiles with mbutils, generated files are gzip encoded, you have to serve them with a gzip content encoding (you can do this with S3).