Class MapObject

A class representing generic map object data within the map.

It could represent various objects on the map, such as desks, walls, etc.

Hierarchy

  • default
    • MapObject

Properties

Accessors

Methods

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 floor(): Floor
  • Gets the Floor associated with the MapObject.

    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 MapObject.

    Returns string

    The name of the object.

  • get type(): string
  • Gets the type of the MapObject.

    Returns string

    The kind of the object.

Methods

  • Serializes the MapObject data to JSON.

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

    An object representing the MapObject.

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

    Parameters

    • instance: object

      The instance to check.

    Returns instance is MapObject

    True if the instance is a MapObject, false otherwise.