A class representing space data within the map.

Spaces are used to represent different areas within a map, such as rooms, hallways, etc.

Hierarchy

  • default
    • Space

Properties

id: string

identity of the map object

links: Hyperlink[] = []

Gets the links associated with this data type.

The links associated with this data type

Accessors

  • get description(): string
  • Returns string

  • get doors(): Door[]
  • Gets the array of Doors associated with the space.

    Returns Door[]

    The doors array.

  • get floor(): Floor
  • Gets the Floor object associated with the space.

    Returns Floor

    The floor object.

    Will throw an error if the floor is not found.

  • get images(): Image[]
  • Returns Image[]

  • get name(): string
  • Gets the name of the space.

    Returns string

    The name of the space.

Methods

  • Serializes the space data to JSON.

    Returns {
        center: {
            floor: undefined | string;
            latitude: number;
            longitude: number;
        };
        floor: string;
        id: string;
        name: string;
        type: TSpaceType;
    }

    An object representing the space.

    • center: {
          floor: undefined | string;
          latitude: number;
          longitude: number;
      }
      • floor: undefined | string
      • latitude: number
      • longitude: number
    • floor: string
    • id: string
    • name: string
    • type: TSpaceType
  • Checks if the provided instance is of type Space.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is Space

    True if the instance is a Space, false otherwise.