Mappedin JS - v6.14.0
    Preparing search index...

    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

    Index

    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(): Space | undefined

      Gets the Space object associated with the node.

      Returns Space | undefined

    Methods

    • Serializes the node data to JSON.

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