🔎 PMTiles Viewer: https://protomaps.github.io/PMTiles/ 🔎
PMTiles is a single-file archive format for tiled data. A PMTiles archive can be hosted on a commodity storage platform such as S3, and enables low-cost, zero-maintenance map applications that are "serverless" - free of a custom tile backend or third party provider.
-
PMTiles Viewer - inspect and preview PMTiles local or remote PMTiles archives.
- Archives on cloud storage may require CORS for the origin
https://protomaps.github.io
- Archives on cloud storage may require CORS for the origin
Demos require MapLibre GL JS v1.15 or later.
See also:
Download the pmtiles
binary for your system at go-pmtiles/Releases.
pmtiles convert INPUT.mbtiles OUTPUT.pmtiles
pmtiles upload OUTPUT.mbtiles s3://my-bucket?region=us-west-2 // requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars to be set
See js/README.md and js/examples for usage in Leaflet or MapLibre GL JS.
See the go-pmtiles repository.
See https://github.com/protomaps/PMTiles/tree/master/python/bin for library usage
The current specification version is Version 3.
Example of how to create a PMTiles archive from the Census Bureau Zip Code Tabulation Areas Shapefile using tippecanoe and the pmtiles
standalone binary:
# use GDAL/OGR to convert SHP to GeoJSON
ogr2ogr -t_srs EPSG:4326 cb_2018_us_zcta510_500k.json cb_2018_us_zcta510_500k.shp
# Creates a layer in the vector tiles named "zcta"
tippecanoe -zg --projection=EPSG:4326 -o cb_2018_us_zcta510_500k_nolimit.mbtiles -l zcta cb_2018_us_zcta510_500k.json
pmtiles convert cb_2018_us_zcta510_500k_nolimit.mbtiles cb_2018_us_zcta510_500k.pmtiles
Using the PMTiles command line tool:
pmtiles upload LOCAL.pmtiles "s3://BUCKET_NAME?endpoint=https://example.com®ion=region" REMOTE.pmtiles
Using RClone (do rclone config
first)
rclone copyto LOCAL.pmtiles r2:/BUCKET/REMOTE.pmtiles --progress --s3-chunk-size=256M --s3-upload-concurrency=2
The reference implementations of PMTiles are published under the BSD 3-Clause License. The PMTiles specification itself is public domain, or under a CC0 license where applicable.