TileflowDocs

Tilesets

Connect maps to PMTiles-backed data

Tilesets define the vector data behind a map. Tileflow stores PMTiles archives in R2, exposes TileJSON and XYZ-compatible vector tile routes, and lets each named map select the tileset it should render.

Config

Name the data once, use it from maps

Define tilesets at the project level, then point each map at a tileset by name. Deploy resolves that name to hosted Tileflow delivery routes.

tileflow.config.ts
import { defineTileflow, osm } from "@tileflow/core";
 
export default defineTileflow({
  tilesets: {
    madrid: {
      id: "madrid",
      name: "Madrid",
      attribution: "OpenMapTiles and OpenStreetMap contributors",
    },
  },
  maps: {
    madrid: {
      basemap: osm({ tileset: "madrid" }),
      theme: "light",
      view: {
        center: [-3.7038, 40.4168],
        zoom: 12,
      },
    },
  },
});

CLI flow

Register, upload, inspect, deploy

Register a project-owned tileset first, then upload a PMTiles archive of at most 32 MiB through the API. Use tileflow status to verify that the manifest, published archive, and deployed styles agree.

Terminal
export TILEFLOW_API_KEY=tf_live_...
tileflow tileset register --id madrid --name Madrid
tileflow tileset upload ./madrid.pmtiles --id madrid
tileflow status
tileflow deploy --tileset madrid

Status

What to check before a deploy

The status command is the fastest way to spot missing PMTiles archives, orphan uploads, and stale deployed styles.

worldDefault public tileset ID used by starter configs and examples.
PMTilesArchive format served through range reads from Cloudflare R2.
TileJSONMetadata endpoint consumed by generated MapLibre styles.
sourceLayersOptional layer-name overrides when a dataset does not match OpenMapTiles names.
tileflow statusShows project ID, registered tilesets, archive sizes, upload dates, and styles.
deploy --tilesetOverrides the selected tileset for a deploy without changing config.
manifest.jsonStores the deployed map ID, style URL, style ID, environment, and tileset ID.