Skip to content

Examples

Every example here is a live map with the complete YAML document that draws it, ready to copy. Start with the first four, in order; each adds one idea to the one before. Then use the gallery to look up a specific technique.

MapLibre examples in YAML

The MapLibre GL JS examples rebuilt as YAML documents, grouped by what they show, with a search. Open the gallery

Live updates by id

Vehicles or sensors that move: each poll updates the features it matches and keeps the rest. Live data: merge

Mapzen classics

Crosshatch and Blueprint, two Tangram-era looks rebuilt in YAML and run with experimental effects, next to their exported style.json. View the classics

Save the document as a .yaml file in your site and load it with <ml-map src="map.yaml"> on an HTML page, or with the <Map> component in Astro. A document that reads a file by a path starting with /, such as /data/classify/sample-tracts.geojson, needs that file in your site too.