Hierarchy

Hierarchy data exposes the clients, campuses, buildings and floors that a ViewerToken has access to.

Getting a hierarchy

Hierarchy data can be loaded directly without the need for a viewer via locatrix.plans.loadHierarchy().

locatrix.plans.loadHierarchy(viewerToken)

Returns a promise that will resolve with the hierarchy data.

The promise will reject if there are network errors while loading the hierarchy.

Format

Hierarchy data is returned in the following format.

{
  clients: [{
    ...
    campuses: [{
      ...
      buildings: [{
        ...
        floors: [{
          ...
        }]
      }]
    }]
  }]
}

Client

Campus

planCode will be null if the ViewerToken does not have access to the site plan.

address and postCode will be null if the fields have never been set.

Building

Floor

planCode will be null if the ViewerToken does not have access to the floor plan.

address and postCode will be null if the fields have never been set.