Appearance
Interface: BuildingChangePayload
Payload for the buildingChange event.
Fires when the user navigates to a different building inside a multi-building property (e.g. an airport with multiple terminals, or a campus with multiple structures). The iframe dispatches this once per building transition — never on the initial mount and never if the building has not actually changed.
Wire source (live — not PENDING): CHILD_ACTIONS.BUILDING_CHANGE dispatched at useBaseMapDataHandling.js:dispatchBuildingChangeEvent (maps-web, verified 2026-04-29).
Example
ts
import { on } from '@mapsted/maps-js-api';
on('buildingChange', (payload) => {
console.log('Entered building', payload.buildingId);
if (payload.previousBuildingId !== null) {
console.log('Left building', payload.previousBuildingId);
}
});