Commands
Once connected, you hold a WaylocateMap handle. Call methods on namespaces; each returns a promise.
if (map.supports("camera.orbit")) {
await map.camera.orbit({ ref: "muntz-hall", secondsPerRevolution: 20 });
}
Control surfaces
| Namespace | Purpose | Examples |
|---|---|---|
map.selection | Building, floor, room | setBuilding("muntz-hall"), setRoom("muntz-hall/170"), clear() |
map.directions | Wayfinding | start({ from: "here", to: "muntz-hall/170" }), clear() |
map.camera | Viewport | flyTo({ zoom: 18, duration: 800 }), fitTo("muntz-hall"), get() |
map.camera (paths) | Scripted motion | setPath(…), setProgress(0.5), playPath(…), orbit(…) |
map.ui | Chrome visibility | setChrome({ search: false }) |
map.getState() | Full snapshot | campus, selection, directions, camera, url |
References use stable slugs (muntz-hall/170, muntz-hall/floor/2, here, pin:39.13,-84.51).
Wire command names
These map 1:1 to the protocol command reference:
selection.setBuilding, selection.setFloor, selection.setRoom, selection.clear, directions.start, directions.clear, camera.get, camera.jumpTo, camera.flyTo, camera.fitTo, camera.cancel, camera.setInteractions, camera.setBasemap, camera.setPath, camera.setProgress, camera.playPath, camera.orbit, camera.followRoute, ui.setChrome, map.getState, events.subscribe, events.unsubscribe, host.hello
See the protocol inspector demo to send any command against a live map.