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
MBTileswhen your tile-generation workflow already exports.mbtilesfiles. - 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
.pmtilesfiles instead.
Upload and publish flow
- Generate the MBTiles file before upload. Mappinest currently hosts pre-generated tilesets.
- Upload the MBTiles file through the console. See Upload Data for the full upload workflow, accepted formats, and validation steps.
- Let Mappinest validate the tileset metadata, tile complexity, zoom range, and delivery format.
- 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.
- 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.
Use the uploaded MBTiles in a map client
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.
What to read next
Last updated: October 1, 2026