Skip to main content

Commands

Every command is acknowledged with a correlated result. Unknown commands return UNSUPPORTED; malformed payloads return INVALID_PAYLOAD.

CommandPayload summary
selection.setBuilding{ ref, floor? }
selection.setFloor{ ref }
selection.setRoom{ ref }
selection.clear
directions.start{ from?, to, mode?, accessible? }
directions.clear
camera.get
camera.jumpToCameraOptions
camera.flyToCameraOptions & AnimationOptions
camera.fitTo{ ref }
camera.setPath{ keyframes, smoothing? }
camera.setProgress{ progress }
camera.playPath{ keyframes, duration, loop?, essential?, smoothing? }
camera.orbit{ ref?, center?, zoom?, pitch?, secondsPerRevolution, direction?, loop?, essential? }
camera.followRoute{ mode, duration?, pitch?, zoom?, essential? }
camera.cancel
camera.setInteractions{ pan?, zoom?, rotate? }
camera.setBasemap{ mode: "standard" | "satellite" }
ui.setChromePartial<ChromeFlags>
map.getState
events.subscribe{ events: string[] }
events.unsubscribe{ events: string[] }
host.hello{ sdk?, protocol? } → readiness payload

Camera options

interface CameraOptions {
center?: { lat: number; lng: number };
zoom?: number; // 0–22
bearing?: number; // degrees, 0 = north
pitch?: number; // degrees from vertical, 0–60
}

interface AnimationOptions {
duration?: number; // ms; 0 is instant
animate?: boolean;
essential?: boolean; // animate even under prefers-reduced-motion
curve?: number;
speed?: number;
}

Out-of-range values are rejected with INVALID_PAYLOAD, not clamped.

Camera paths

Scroll-driven camera motion uses camera.setPath once, then camera.setProgress to scrub — not a camera command per frame.

camera.orbit builds a looping bearing path. camera.followRoute generates a path from the currently drawn route.

camera.cancel stops path playback and MapLibre animations.