Host MBTiles with Mappinest

Host MBTiles files with Mappinest and serve uploaded tilesets through TileJSON, vector tile, and raster tile endpoints.

Use this page when you already have an MBTiles file and want Mappinest to handle upload, validation, access control, caching, and tile delivery. Mappinest does not require your web map to understand the MBTiles container directly. After upload, the tileset is consumed through standard TileJSON and XYZ tile URLs.

When to use MBTiles hosting

  • Use MBTiles when your tile-generation workflow already exports .mbtiles files.
  • Use it for vector tilesets generated by tools such as Tippecanoe, Planetiler, GDAL, or Tilemaker.
  • Use it for raster tilesets when you already have tiled image output packed into MBTiles.
  • Use Host PMTiles with Mappinest when your workflow exports .pmtiles files instead.

Upload and publish flow

  1. Generate the MBTiles file before upload. Mappinest currently hosts pre-generated tilesets.
  2. Upload the MBTiles file through the console. See Upload Data for the full upload workflow, accepted formats, and validation steps.
  3. Let Mappinest validate the tileset metadata, tile complexity, zoom range, and delivery format.
  4. Open Tilesets, click the ready tileset name to open the preview, then click Show API URL and copy the TileJSON or direct tile URL from the API drawer.
  5. Use the URL in a map client, backend service, or GIS workflow.

Primary endpoint

Use TileJSON first when the map client can read source metadata from a URL. It keeps the tile template, bounds, zoom range, and vector layer metadata in one document.

GET
https://api.mappinest.com/v1/tiles/{tilesetId}.json?key=YOUR_KEY
ParameterDescription
tilesetId
Generated tileset Id for the uploaded file. Find it in the Tilesets console, or see tileset naming for the exact rule and duplicate-name behavior.
key
API key used to authorize the request. See API Keys & Access for key restrictions and allowed-domain setup.

Use the uploaded MBTiles in a map client

MapLibre GL JS source
const apiKey = 'YOUR_MAPPINEST_KEY';

map.addSource('counties', {
  type: 'vector',
  url: `https://api.mappinest.com/v1/tiles/mappinest.COUNTIES.json?key=${apiKey}`
});

map.addLayer({
  id: 'counties-fill',
  type: 'fill',
  source: 'counties',
  'source-layer': 'COUNTIES',
  paint: {
    'fill-color': '#2563eb',
    'fill-opacity': 0.2
  }
});

Replace COUNTIES with your own tileset Id and source layer. Inspect the TileJSON response if you are not sure which source-layer value your MBTiles file exposes.

Production notes

  • Use API key restrictions before putting the URL into a public web map.
  • Check Upload Data for current tile-size and raster-resolution limits.
  • Use the GitHub examples when you want complete map-client projects around the same URL patterns.

Last updated: June 24, 2026