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

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" }

  • Gets the navigation flags of the node.

    Navigation flags are string identifiers that describe properties of this node for navigation, such as accessible for wheelchair accessibility or outdoors for outdoor routes.

    Returns readonly string[]

    An array of navigation flags present on this node.

  • get neighbors(): Node[]

    Gets the neighboring nodes of this node.

    Returns Node[]

    An array of neighboring Node objects.

  • get space(): undefined | Space

    Gets the Space object associated with the node.

    Returns undefined | Space

Methods

  • Serializes the node data to JSON.

    Returns {
        __type: string;
        coordinate: {
            __type: string;
            floorId: 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.