Events
Default subscriptions are always on. High-frequency events are opt-in via events.subscribe.
| Event | Payload | Default |
|---|---|---|
map.ready | { protocol, campus, capabilities, build? } | on |
map.loaded | full state snapshot | on |
map.error | { code, message } | on |
state.changed | full state snapshot | on |
selection.changed | { building, floor, room } | on |
directions.changed | { from, to, mode, status } | on |
expand.requested | { url } | on |
camera.changed | CameraOptions | opt-in, ~10 Hz |
camera.idle | CameraOptions | opt-in |
camera.pathEnded | { reason } | on |
State snapshot
interface WaylocateState {
ready: boolean;
campus: string;
building: string | null;
floor: string | null;
room: string | null;
directions: { from: string | null; to: string | null; mode: "preview" | "live" } | null;
camera: CameraOptions | null;
url: string;
}
expand.requested
When the visitor clicks expand and the host has subscribed via events.subscribe, the map emits { url } and does not open a new tab. When not subscribed, the map window.opens the canonical full-map URL.
Camera event sources
user = visitor gesture, host = command, system = product framing (e.g. selection fly).