A class representing Path node data within the map.

Nodes are used to define points in the map's pathfinding graph.

Hierarchy

  • default
    • Node

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 externalId(): string
  • Gets the external ID of the node.

    Returns string

    The external ID of the node.

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

    Returns Floor

    The floor object.

    Will throw an error if the floor is not found.

  • get neighbors(): Node[]
  • Gets the neighboring nodes of this node.

    Returns Node[]

    An array of neighboring Node objects.

Methods

  • Serializes the node data to JSON.

    Returns {
        coordinate: {
            floor: undefined | string;
            latitude: number;
            longitude: number;
        };
        floor: string;
        id: string;
        neighbors: string[];
    }

    An object representing the node.

    • coordinate: {
          floor: undefined | string;
          latitude: number;
          longitude: number;
      }
      • floor: undefined | string
      • latitude: number
      • longitude: number
    • floor: string
    • id: string
    • neighbors: string[]
  • Checks if the provided instance is of type Node.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is Node

    True if the instance is a Node, false otherwise.