Appearance
Function: navigateToBuilding()
ts
function navigateToBuilding(params): Promise<void>;Navigate the map to a building, optionally focusing a specific floor.
Emits the OPEN_BUILDING_VIEW action, which the mapsted-maps-web iframe handles by boosting the map to the target building (and floor when given). floorId is optional — the map side requires only the building and treats the floor as an optional focus (verified against maps-web main: useIframeStore OPEN_BUILDING_VIEW → getBoost, which keys on building).
To move between floors of a building you already have in view, prefer navigateToFloorById / navigateToFloorByName.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | { buildingId: number; floorId?: number; } | - |
params.buildingId | number | Target building id (required). |
params.floorId? | number | Optional floor id to focus within the building. |
Returns
Promise<void>
Throws
MAPSTED-1012 when buildingId is missing.
Throws
MAPSTED-1013 when buildingId is not a number, or floorId is supplied but not a number.
Throws
MAPSTED-1090 when the SDK is not in the READY state.