Skip to content

Display a map with MLT

Replicates the MapLibre example Display a map with MLT. MapLibre Tiles (MLT) once needed a plugin registered before the map started. maplibre-gl now decodes them natively, and a tileset says it is MLT in its own TileJSON ("encoding": "mlt"). So an MLT basemap is just a style URL — no JavaScript left.

The MapLibre demo world, served as MLT
display-a-map-with-mlt.yaml
# yaml-language-server: $schema=https://docs.maplibre-yaml.org/schema/latest/map.schema.json
# Gallery twin of https://maplibre.org/maplibre-gl-js/docs/examples/display-a-map-with-mlt/
# MapLibre Tiles (MLT) need no plugin any more: maplibre-gl decodes them
# natively, and a tileset says it is MLT in its own TileJSON
# (`"encoding": "mlt"`). So an MLT basemap is just a style URL.
type: map
id: display-a-map-with-mlt
config:
center: [0, 0]
zoom: 1
maplibreLogo: true
mapStyle: "https://demotiles.maplibre.org/tiles-mlt/plain.json"
  • Needs a maplibre-gl version with built-in MLT decoding (the docs site runs 5.24).
  • No hermetic twin: there is no local MLT tileset to stand in honestly; the live docs sweep covers this page.