Hash routing
Replicates the MapLibre example Hash routing: the viewport lives in the URL fragment.
The complete document
Section titled “The complete document”# 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/hash-routing/# Pan or zoom, then reload: the viewport lives in the URL fragment.type: mapid: hash-routingconfig: center: [-0.13, 51.51] zoom: 11 hash: true mapStyle: "https://demotiles.maplibre.org/style.json"What to notice
Section titled “What to notice”config.hash: trueround-trips#zoom/lat/lng/bearing/pitchthrough the URL — deep-linkable map states with zero code.