Serving tiles
A map style embeds the MBTiles filename in its tile URLs
(/maps/tiles/{tile_set}/{z}/{x}/{y}), so the tile_set segment doubles as a per-version cache key
(tiles are cached 24h; styles and TileJSON are never cached).
The catalog
MBTILES_CATALOG is the single source of truth: a space-separated list of every MBTiles filename in
/var/lib/db/ that a deploy downloads and serves.
- The service can serve any catalog entry by name.
MBTILES_FILENAMEandSTREETS_MBTILES_FILENAMEpick the defaults the style sources point at (both must be listed in the catalog). - A file whose name starts with
osm-woo-landorosm-woo-streetsis served with thelandcover-*overlay merged in at read time (LANDCOVER_MBTILES_FILENAME); the main combined tileset is not. - A request for a
tile_setnot in the catalog returns404. There is no silent fallback to the main tileset, which would serve wrong-schema tiles and poison the 24h cache under that name's URL.
Because every container serves every catalog entry, a rolling deploy is safe: keep both the old and new filenames in the catalog during the roll and any container (old or new) can serve either name. See Deploying for the rollout.
Endpoints
| Path | Returns |
|---|---|
/maps/tiles.json |
TileJSON for the main default tileset. |
/maps/tiles/{tile_set}/tiles.json |
TileJSON for a specific catalog entry. |
/maps/tiles/{tile_set}/{z}/{x}/{y} |
A gzipped MVT vector tile from that tileset. |
/maps/tiles/{z}/{x}/{y} |
Deprecated; serves the main default tileset. |
{z}/{x}/{y} are standard XYZ coordinates; the row is flipped to TMS internally when reading the
MBTiles. Tiles are returned Content-Encoding: gzip, Content-Type: application/x-protobuf.