Interface FloorChangerServiceInterface

The floor changer service reports available and current floors and provides methods to change the current floor.

interface FloorChangerServiceInterface {
    currentFloors: SiteModelEntityInterface[];
    onFloorChange: Signal<FloorChangeHandler>;
    onFloorUpdate: Signal<FloorUpdateHandler>;
    changeFloorByEntity(entity: SiteModelEntityInterface, mayChangeLocation?: boolean): Promise<void>;
    changeFloorByName(floorName: string, mayChangeLocation?: boolean): Promise<void>;
}

Properties

currentFloors: SiteModelEntityInterface[]

Currently active floor entitites

onFloorChange: Signal<FloorChangeHandler>

Signal that is emitted when the current floor is changed

onFloorUpdate: Signal<FloorUpdateHandler>

Signal that is emitted when the list of available floors is changed

Methods

  • Change the floor to the specified site model entity or one of its parent entities

    All floors with the same name are added to the list of current floors. The call may result in an onFloorChange event.

    Parameters

    • entity: SiteModelEntityInterface

      A site model entity that is a floor or has a floor in its ancestor chain

    • OptionalmayChangeLocation: boolean

      Indicates if floor change should cause a location change (defaults to true for the panorama view being the main one, false for the main map view)

    Returns Promise<void>

    Promise which resolves if a floorChanged event was triggered, otherwise rejects.

  • Change the current floor by a provided floor name

    All floors with the same name are added to the list of current floors. The call may result in an onFloorChange event.

    Parameters

    • floorName: string

      Name of floor to change to

    • OptionalmayChangeLocation: boolean

      Indicates if floor change should cause a location change (defaults to true for the panorama view being the main one, false for the main map view)

    Returns Promise<void>

    Promise which resolves if a floorChanged event was triggered, otherwise rejects.