Skip to content

YAML reference

Every key the maplibre-yaml validator accepts, with its type, default, allowed values, and description. The guides under YAML Schema explain how to use these keys; this reference lists all of them.

PageCovers
Map block (v1)Every key of a type: map block in format v1, generated from the schemas.
SourcesEvery data-source type and key, generated from the schemas.
LayersEvery layer type and key, including interactivity, generated from the schemas.
Map block (v2)Every key of a format-v2 (style:/runtime:) map block, generated from the schemas.
Scrollytelling blockEvery key of a type: scrollytelling block, generated from the schemas.
Root document (pages)Every key of a multi-page pages: root document, generated from the schemas.
  • Type uses TypeScript-like notation: string[] is a list of strings, map of X is a YAML mapping whose keys you choose, and a | b means either.
  • Required keys must be present; everything else is optional.
  • A key whose structure is shared (the popup DSL, controls, legend items, …) is documented once; other places link to it.
  • paint and layout properties are MapLibre’s own; each links to the MapLibre style spec.
  • Keys starting with x- are accepted anywhere as extensions and never validated.

The same schemas are published as JSON Schema for editors and agents (format v1):

See Editor Setup to wire them into VS Code.