Map

Map injection boundaries for the consumer-owned MapLibre map.

Responsibilities

Waymark no longer creates or owns a map. The consumer constructs the MapLibre Map — container, style, basemaps, camera and attribution — and injects it into createInstance({ map, document? }).

Waymark's map-facing responsibilities are:

Explicitly not Waymark's responsibility:

Input and output boundaries

One runtime exists per map: the registry is a WeakMap keyed by the injected map. A second createInstance(...) call with the same map throws until the existing instance is destroyed.

Runtime behaviour

For public injection validation, config defaults and event payload contracts, treat docs/1.api.md as the source of truth.

Internal files

src/map/** has been removed entirely — no map creation, container creation, style/basemap ownership, or camera sync remains in the library.