Loading account...

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. After upload, Mappinest exposes the tileset through TileJSON, vector tile, and raster tile URL patterns.

Your map client does not need to read the MBTiles file directly. It can consume the Mappinest Tiles API through standard TileJSON metadata and XYZ vector or raster tile endpoints. TileJSON integration is the recommended option when your map client supports it.

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. After processing finishes, click the tileset ID in the Tilesets table to open Studio, preview the tileset, and copy its TileJSON and direct tile URLs.
  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 Tileset ID column 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: October 1, 2026