Skip to content
English
  • There are no suggestions because the search field is empty.

Wayfinder Floor Database Class

Floors or Maps (interchangable name) represent a single level or floor within the entire project.

his class inherits and therefore includes all the methods and functions defined the standard wayfinder database base class. This class provides the following static properties:

StatusNotLoaded

property

A number representing the status of floor, in this case, the floor hasn't started loading yet.

StatusLoading

property

A number representing the status of floor, in this case, the floor has started to load.

StatusLoadError

property

A number representing the status of floor, in this case, the floor encountered an error during loading and so cannot be displayed.

StatusLoadReady

property

A number representing the status of floor, in this case, the floor has successfully loaded and is ready to be displayed.

and exports the following functions:

getFloorStatus(floorId)

function

Returns one of the above status codes representing the status of the specified map, or null, if the map was not found.

getFloorBounds(floorId)

function

Returns a Wayfinder Bounds object containing the bounding box/cube for the specified map, or null if the map was not found.

inBuilding(id)

function

Returns an instance of WayfinderFloorDatabase that only contains the maps that exist within the specified build ID.

getActiveBounds(floorId)

function

Gets the active bounds for the floor, if they don't exist they are calculated (returns null if they don't exist)

getFloorAverageDestinationSize(floorId)

function

Calculates the average size of destinations on a given floor or null if the floor does not exist or has no destinations.

Returns an object with total (the number of destinations included in the calculation) and sum (an object with properties x , y and z which represents the width, height and depth respectively.

Each record in the WayfinderFloorDatabase contains the following properties and functions:

building

property (r)

The ID of the building this map is contained within. If the map doesn't have a building then this may represent the root of the map. See Wayfinder Building Database.

id

property (r)

The unique floor/map ID

name

property (r)

The name of this floor/map.

order

property (r)

A number used to sort the maps, typically used to aid displaying them in the correct order within the UI.

shortname

property (r)

The short name for this floor/map.

status

property (r)

Status of the map, one of the Status values above.

url

property (r)

An array of map geometry URLs that are decoded to actually 3D render the map.

bounds

property

(r)

The pre-calculated min and max bounds of the map geometry only.

active_area_bounds

property
(r)

The pre-calculated min and max bounds of the Nodes and Destinations.

avg_destination_size

property
(r)

The average size of all the destination meshes on the floor.

starting_position

property (r)

If defined, switching to the floor should focus the map on this position.
May be undefined for projects which have not been re-published.