Skip to main content

Tileset sources

A tileset source is raw geographic data formatted and uploaded to Mapbox to be used by MTS to produce tiles. Tileset sources are required by the Mapbox Tiling Service (MTS) to create new tilesets. A tileset source can be composed of up to 10 files.

A tileset source can be referenced

  • in each layer of a tileset recipe for vector recipes.
  • in multiple sources for raster and rasterarray recipes.

This example recipe shows the source field for a vector recipe, where it is defined as a key in the layer object "trees":

{
"version": 1,
"trees": {
"source": "mapbox://tileset-source/{username}/trees-data",
"minzoom": 4,
"maxzoom": 8
}
}

The same tileset source can be reused across multiple tilesets and multiple layers of tilesets an unlimited number of times. If your data is not changing, then you do not need to upload it every time you want to create a tileset. Instead, you would Publish your tileset..

This example recipe shows the source field for a raster and rasterarray recipe where it is defined at the root level:

{
"version": 1,
"type": "rasterarray",
"sources": [{"uri":"mapbox://tileset-source/{ACCOUNT}/{SOURCE_NAME}"}],
"minzoom": 0,
"maxzoom": 6,
"layers": { layername: LayerObject, ... }
}

This difference is because vector and raster tilesets store source data differently. Vector tilesets can create separate feature layers from a single input source, while raster jobs usually combine multiple files into a single layer.

Was this page helpful?