Getting started
Embed a Waylocate campus map in your page and drive it from your own UI.
The map runs on Waylocate's origin. This package is the host-side interface — typed commands, typed events, no manual postMessage wiring.
This documentation targets @waylocate/embed@0.2.1 speaking wire protocol waylocate: 1.
Install
npm install @waylocate/embed@0.2.1
React apps also need React 17+:
npm install @waylocate/embed@0.2.1 react
Choose how to integrate
| Your stack | Import | What you write |
|---|---|---|
| React (recommended) | @waylocate/embed/react | <CampusMap campus="…" /> — no iframe in your JSX |
| Any other JS | @waylocate/embed | mount({ container, campus }) — hand over a DOM node |
| You already have an iframe | @waylocate/embed | buildEmbedUrl() + connect({ iframe }) |
| Static embed, no JS control | none | plain <iframe src="…"> |
Every path that uses the SDK resolves to the same WaylocateMap handle — one object for commands and events.
Guides
- React — CampusMap
- Vanilla JavaScript — mount()
- Advanced — you own the iframe
- Static embed
- Script tag — no bundler
Spatial intelligence: Venue model
Campus maps are backed by a shared venue and campus schema. Understanding the data model helps when interpreting selection refs and routing behavior.
Read more →