Skip to main content

Protocol overview

The Waylocate embed protocol is a versioned postMessage contract between a host page and an embedded map iframe.

This documentation targets @waylocate/embed@0.2.1 speaking wire protocol waylocate: 1.

Layers

LayerMechanismPurpose
0CampusControllerInternal intent funnel (same code path as human clicks)
1URL deep linksInitial state, shareable, no JS
2postMessage protocolLive control from the parent page
3@waylocate/embed SDKTyped wrapper over Layer 2

Design rules

  1. One intent funnel — host commands call the same functions a human click calls.
  2. References are slugs, never internal IDs.
  3. Every command is acknowledged with a correlation id.
  4. Every event carries its source (user, host, or system).
  5. The protocol is versioned from message one — the waylocate field is both namespace guard and version.
  6. Humans always win — no controlled mode.

Sections

Try the protocol inspector against a live map.