Skip to main content

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

NamespacePurposeExamples
map.selectionBuilding, floor, roomsetBuilding("muntz-hall"), setRoom("muntz-hall/170"), clear()
map.directionsWayfindingstart({ from: "here", to: "muntz-hall/170" }), clear()
map.cameraViewportflyTo({ zoom: 18, duration: 800 }), fitTo("muntz-hall"), get()
map.camera (paths)Scripted motionsetPath(…), setProgress(0.5), playPath(…), orbit(…)
map.uiChrome visibilitysetChrome({ search: false })
map.getState()Full snapshotcampus, 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.