Command-line tool for serving PMTiles databases from an on-demand web server.
It's basically a simpler and dumber version of geojson.io but for PMTiles databases that you can run locally from a single binary application.
Have a look at the Small focused tools for visualizing geographic data blog post for more background.
Documentation (godoc) is incomplete at this time.
$> make cli
go build -mod vendor -ldflags="-s -w" -o bin/show cmd/show/main.go
To enable use the WebViewBrowser Browser implementation tools will need to be build with the webview tag set. For example:
$> go build -mod vendor -ldflags="-s -w" -tags webview -o bin/show cmd/show/main.go
$> ./bin/show -h
Command-line tool for serving PMTiles tiles from an on-demand web server.
Usage:
./bin/show [options]
Valid options are:
-browser-uri string
A valid sfomuseum/go-www-show/v2.Browser URI. Valid options are: web:// (default "web://")
-initial-view string
A comma-separated string indicating the map's initial view. Valid options are: 'LON,LAT', 'LON,LAT,ZOOM' or 'MINX,MINY,MAXX,MAXY'.
-leaflet_point_style string
A custom Leaflet style definition for points. This may either be a JSON-encoded string or a path on disk.
-leaflet_style string
A custom Leaflet style definition for geometries. This may either be a JSON-encoded string or a path on disk.
-map-provider string
Valid options are: leaflet, protomaps (default "leaflet")
-map-tile-uri string
A valid Leaflet tile layer URI. See documentation for special-case (interpolated tile) URIs. (default "https://tile.openstreetmap.org/{z}/{x}/{y}.png")
-port int
The port number to listen for requests on (on localhost). If 0 then a random port number will be chosen.
-protomaps-theme string
A valid Protomaps theme label (for the base map not individual PMTiles databases). (default "white")
-raster value
Zero or more {LAYER_NAME}={PATH} pairs referencing PMTiles databases containing raster data.
-vector value
Zero or more {LAYER_NAME}={PATH} pairs referencing PMTiles databases containing vector (MVT) data.
-verbose
Enable verbose (debug) logging.
$> ./bin/show \
-initial-view -122.408061,37.601617,-122.354907,37.640167 \
-raster test=fixtures/1930-raster.pmtiles
2025/03/12 14:36:38 INFO Server is ready and features are viewable url=http://localhost:52722
Which, when you open http://localhost:52722 in your web browser, would yield this:
$> ./bin/show \
-initial-view -122.408061,37.601617,-122.354907,37.640167 \
-vector sfo=fixtures/sfo.pmtiles
2025/03/18 08:09:11 INFO Server is ready and features are viewable url=http://localhost:62411
Which, when you open http://localhost:52722 in your web browser, would yield this:
As of this writing there is only a single default style for (PMTiles) vector layers. It is a fork of the default light style which has been updated to have a transparent background for areas where there is no tile data. The determination of which areas are considered to have tile data, as seen in the screenshot above, is determined by Protomaps and changes depending on the zoom level.
If the path component of the a -raster or -vector flag starts with "http" it will be assumed that the PMTiles database in question is hosted on a remote server and fetch the data from there. For example:
$> make raster-remote
go run cmd/show/main.go \
-initial-view -122.408061,37.601617,-122.354907,37.640167 \
-raster sfo=https://static.sfomuseum.org/aerial/2025.pmtiles
2025/11/25 12:25:15 INFO Server is ready and features are viewable url=http://localhost:49294
Which, when you open http://localhost:49294 in your web browser, would yield this:


