Skip to content

TileJSON

A vector, raster or raster-dem source can point at a TileJSON 3.0.0 document with its url property. MapLibre extends TileJSON with the keys below. A value set on the source in the style takes precedence over the same key in the TileJSON.

emptyResponse

vector, raster, raster-dem

Optional enum. Possible values: blank, missing. Defaults to "blank".

Experimental. What an empty tile response (HTTP 204, or no tile data from an archive such as PMTiles) means in this tileset.

  • blank: The tile is in the tileset and has nothing at that place.
  • missing: The tileset has no tile there at that zoom level, and a renderer may use a tile from another zoom level in its place.
SDK Support MapLibre GL JS MapLibre Native
Android
MapLibre Native
iOS
basic functionality ❌ (#3990) ❌ (#4767) ❌ (#4767)

encoding

vector

Optional enum. Possible values: mvt, mlt. Defaults to "mvt".

The encoding used by this source. Mapbox Vector Tiles encoding is used by default.

  • mvt: Mapbox Vector Tiles. See http://github.com/mapbox/vector-tile-spec for more info.
  • mlt: MapLibre Vector Tiles. See https://github.com/maplibre/maplibre-tile-spec for more info.
SDK Support MapLibre GL JS MapLibre Native
Android
MapLibre Native
iOS
mvt ✅ ✅ ✅
mlt 5.12.0 12.1.0 6.20.0

raster-dem

Optional enum. Possible values: terrarium, mapbox, custom. Defaults to "mapbox".

The encoding used by this source. Mapbox Terrain RGB is used by default.

  • terrarium: Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.
  • mapbox: Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.
  • custom: Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters.
SDK Support MapLibre GL JS MapLibre Native
Android
MapLibre Native
iOS
mapbox, terrarium 0.43.0 6.0.0 6.0.0
custom 3.4.0 ❌ (#2783) ❌ (#2783)

tileSize

raster, raster-dem

Optional number. Units in pixels. Defaults to 512.

The minimum visual size to display tiles for this source.