Choose your path
maplibre-yaml draws a web map from a YAML file: you describe the map, its data and its styling, and a small script on the page does the rest. Pick the row that matches what you want to make. Each one says where to start, what to read next, and where to look things up.
Not sure what maplibre-yaml is? Read What is maplibre-yaml? first. Every page outside Advanced uses the default format (format v1).
A map in an HTML page
Section titled “A map in an HTML page”One HTML file and one YAML file, loaded from a CDN. Nothing to install and no build step; any static host (GitHub Pages included) can publish it.
- Start: Quick start: a map in an HTML page
- Then: Your first map, explained · Loading data · Layers & styling · Popups, hover & controls
- Look up: HTML pages: the
<ml-map>element · YAML reference
An Astro site on GitHub Pages
Section titled “An Astro site on GitHub Pages”An Astro site with a map on any page, published by GitHub Actions on every push.
- Start: Quick start: Astro site on GitHub Pages
- Then: Your first map, explained ·
Astro (build-time loading,
<FullPageMap>) · Astro content collections - Look up: Astro components · YAML reference
A story map
Section titled “A story map”A map that moves as the reader scrolls through chapters of text and images (often called scrollytelling).
- Start: Story maps in plain HTML, or Story maps in Astro
- Then: Story file reference (chapters, camera moves and actions)
- Look up: Scrollytelling block reference
A thematic map
Section titled “A thematic map”A choropleth, graduated circles or a category map: colour or size each feature by one of its values, with a legend made for you.
- Start: Thematic maps & legends
- Then: Thematic maps example · Accessibility & languages (number formats, map titles and descriptions)
- Look up:
classify:in the layer reference
Large data
Section titled “Large data”A dataset too big for one GeoJSON file, imagery or elevation, or a basemap you host yourself: PMTiles, FlatGeobuf, GeoParquet and Cloud Optimized GeoTIFF files, read in parts straight from a static host.
- Start: Large data: PMTiles, FlatGeobuf, GeoParquet & COG
- Then: Hosting: range requests and CORS · Host your own basemap
- Look up: Sources reference · Cloud-native examples
Already know MapLibre?
Section titled “Already know MapLibre?”A maplibre-yaml document is a MapLibre style with the page behaviour added:
paint:, layout:, filter: and expressions are the
style spec, passed through
unchanged. What maplibre-yaml adds is data loading, popups, legends, controls
and stories, written in the same file.
- Start: JavaScript next to the YAML, then the MapLibre examples in YAML: every official MapLibre example, with which ones the format expresses on its own
- Then: Export to style.json:
mlym emitturns a document into a plainstyle.json, and Export classes lists what each construct becomes - Look up: JavaScript API · TypeScript API
Something’s broken
Section titled “Something’s broken”A blank map, an error card, a notice on the map, or a map that works on your computer but not once published.
- Start: Troubleshooting