Class Node

A class representing Path node data within the map.

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

Hierarchy

  • default
    • Node

Implements

Properties

Accessors

Methods

Properties

id: string

The identity of the map metadata.

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 geoJSON(): { geometry: Point; properties: null; type: "Feature" }
  • Gets the underlying GeoJSON Feature representation of this Node.

    Returns { geometry: Point; properties: null; type: "Feature" }

  • 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;
            verticalOffset: number;
        };
        floor: string;
        id: string;
        neighbors: string[];
    }

    An object representing the node.

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

MMNEPVFCICPMFPCPTTAAATR