Skip to content

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

ParamTypeDescription
venuestringVenue / building identifier
floornumberInitial floor ordinal
unitstringUnit feature id to highlight
lat, lngnumberInitial map centre
zoomnumberInitial 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.

Released under commercial licensing.