Skip to main content

Events

Default subscriptions are always on. High-frequency events are opt-in via events.subscribe.

EventPayloadDefault
map.ready{ protocol, campus, capabilities, build? }on
map.loadedfull state snapshoton
map.error{ code, message }on
state.changedfull state snapshoton
selection.changed{ building, floor, room }on
directions.changed{ from, to, mode, status }on
expand.requested{ url }on
camera.changedCameraOptionsopt-in, ~10 Hz
camera.idleCameraOptionsopt-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).