Class Directions

Represents a set of directions between two points.

Directions are used to represent the path between two points on the map, as well as the instructions to follow the path.

Properties

id: string

Accessors

  • get distance(): number

    The total distance of the path in meters.

    Returns number

Methods

  • Serializes the directions to JSON. All getter properties are evaluated and included in the serialized output.

    Returns {
        __type: string;
        directions: DirectionFeature[];
        from: TNavigationTarget[];
        id: string;
        to: TNavigationTarget[];
    }

    An object representing the directions with all properties evaluated.