.mbtiles file into a running tile server. WebPublish reads tile data and metadata directly from the file and exposes it over HTTP. Both raster (PNG) and vector (PBF) tile formats are supported.
How it works
WebPublish opens the MBTiles file (a SQLite database), reads its metadata table, and builds a TileJSON descriptor. It then registers REST endpoints for tile requests, metadata, and an interactive map preview — all under the task’s base URL. Zoom-level constraints (minzoom / maxzoom) are enforced: tile requests outside the valid range return a 404 response.
Supported tile formats
| Format | Type | Description |
|---|---|---|
| PNG | Raster | Standard raster tiles; served with image/png content type |
| PBF | Vector | Mapbox Vector Tiles (MVT); served with application/x-protobuf |
| GeoJSON | Vector (derived) | Converts a PBF tile to GeoJSON on-the-fly; served with application/json |
Endpoints
All endpoints are prefixed with the task ID.Tile endpoint
{z}, column {x}, and row {y}. The {format} must match the tile format stored in the MBTiles file.
Format values:
| Value | Returns |
|---|---|
png | Raster PNG tile |
pbf | Vector PBF tile (MVT) |
geojson | GeoJSON converted from a PBF tile |
TileJSON metadata
tileType field is "vector" for PBF datasets and "raster" for PNG datasets.
Map preview
Creating an MBTiles task
Choose the MBTiles file
Click Browse next to the Path field and select the
.mbtiles file on your machine.Configure options (optional)
- Gzip — leave enabled. Most mapping clients support compressed tile responses.
- Data limit — useful for controlling bandwidth when sharing a large dataset.
Using tiles in a mapping client
Copy the tile URL template from the TileJSONtiles field and use it in your mapping library.
- Mapbox GL JS
- Leaflet
- OpenLayers
Zoom level constraints
Requests for tiles outside the dataset’sminzoom–maxzoom range, or with coordinates outside the valid tile grid for the requested zoom level, return a 404 Out of bounds response. This prevents clients from requesting tiles that do not exist.
The valid bounds are determined entirely by the metadata stored in the MBTiles file itself.
Gzip compression
MBTiles files often store PBF tiles in gzip-compressed form internally. WebPublish handles both cases:- If the stored tile is already gzip-compressed and the client accepts gzip, WebPublish passes it through unchanged.
- If the stored tile is not compressed and gzip is enabled for the task, WebPublish compresses it before sending.
- If the stored tile is compressed but the client does not accept gzip, WebPublish decompresses it before sending.
The task is automatically disabled if the MBTiles file cannot be opened (for example, if it is deleted or moved). Update the Path in the task settings and re-enable the task to restore service.