@maplibre-yaml/core/register
Auto-registration for maplibre-yaml web components
Import this module to automatically register the <ml-map> and
<ml-scrollytelling> web components.
import '@maplibre-yaml/core/register';import 'maplibre-gl/dist/maplibre-gl.css';After importing, the <ml-map> and <ml-scrollytelling> elements are
available in your HTML.
Examples
Section titled “Examples”A scrollytelling story (sticky map + chapters, driven by the scroll)
<ml-scrollytelling src="/stories/my-story.yaml"></ml-scrollytelling>External YAML file (recommended)
<ml-map src="/configs/my-map.yaml" style="height: 400px;"></ml-map>Inline YAML via script tag
<ml-map style="height: 400px;"> <script type="text/yaml">type: mapid: my-mapconfig: center: [-74.006, 40.7128] zoom: 12 mapStyle: "https://tiles.openfreemap.org/styles/liberty"layers: [] </script></ml-map>JSON config attribute (programmatic)
<ml-map config='{"type":"map","id":"demo",...}'></ml-map>References
Section titled “References”Re-exports MLMap
MLMapCameraOwner
Section titled “MLMapCameraOwner”Re-exports MLMapCameraOwner
MLMapErrorDetail
Section titled “MLMapErrorDetail”Re-exports MLMapErrorDetail
MLMapEventMap
Section titled “MLMapEventMap”Re-exports MLMapEventMap
MLScrollytelling
Section titled “MLScrollytelling”Re-exports MLScrollytelling
MLScrollytellingEventMap
Section titled “MLScrollytellingEventMap”Re-exports MLScrollytellingEventMap
registerMLMap
Section titled “registerMLMap”Re-exports registerMLMap
registerMLScrollytelling
Section titled “registerMLScrollytelling”Re-exports registerMLScrollytelling
RejectionKind
Section titled “RejectionKind”Re-exports RejectionKind
UpdateResult
Section titled “UpdateResult”Re-exports UpdateResult
UpdateSummary
Section titled “UpdateSummary”Re-exports UpdateSummary