Indoor map information. When a user enters an indoor map, a callback is triggered via the on method, returning an instance of the IndoorMapInfo type, thereby enabling functions such as indoor navigation and floor switching.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 5.1.1(19).
System capability: SystemCapability.Map.Core
Device behavior differences: For version 5.1.1(19) or later, this API is supported on phones, tablets, and PCs/2-in-1 devices. On other device types, it returns error code 801.
Since: 5.1.1(19)
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| buildingId | string | No | No | Building ID. |
| floorNames | string[] | No | No | Array of building floor names. |
| floorOrders | number[] | No | No | Array of building floor sequences. |
| currentFloorName | string | No | No | Name of the floor that is currently displayed. |
Example:
mapEventManager.on('indoorMapEnter', (indoorMapInfo: map.IndoorMapInfo)=>{
console.info('indoorMapinfo: ' , indoorMapInfo);
})