Embed Demo
The DigiNest embed widget is a self-contained iframe you can drop into any web page. Pass initial state via URL params; communicate at runtime via postMessage.
html
<iframe
src="https://diginest-map-docs.pages.dev/embed/"
width="100%"
height="600"
style="border:none;border-radius:8px;"
allow="fullscreen"
/>Live preview
Deep-link params
| Param | Type | Description |
|---|---|---|
venue | string | Venue / building identifier |
floor | number | Initial floor ordinal |
unit | string | Unit feature id to highlight |
lat, lng | number | Initial map centre |
zoom | number | Initial zoom level |
postMessage API
The embed listens for HostCommand messages from the parent window:
ts
// Fly to a unit
iframe.contentWindow.postMessage({ type: 'FLY_TO_UNIT', unitId: 'unit-a' }, '*');
// Change floor
iframe.contentWindow.postMessage({ type: 'SET_FLOOR', ordinal: 1 }, '*');The embed emits IFrameEvent messages back to the parent when the user interacts with the map.
