Class Connection

A class representing connection data within the map.

Connections are used to represent pathways between different map nodes.

Hierarchy (View Summary)

  • DetailedMapData<Feature<Point, SpaceProperties> | Feature<Point, MVFConnection>>
    • Connection

Implements

Properties

id: string

The identity of the map data.

Accessors

  • get accessible(): boolean

    Whether the connection is accessible. For example elevators are accessible while stairs are not.

    Returns boolean

    Whether the connection is accessible.

  • get description(): string

    Gets the description of the map feature.

    Returns string

    The description of the map feature, or an empty string if no description exists.

  • get externalId(): string

    Gets the external identifier of the map feature.

    Returns string

    The external ID of the map feature, or an empty string if no external ID exists.

  • get extra(): undefined | Record<string, unknown>

    Extra properties of the connection.

    Returns undefined | Record<string, unknown>

    Extra properties of the connection.

  • get floors(): Floor[]

    Gets the floors (Floor) associated with the connection.

    Returns Floor[]

    An array of floors for the connection.

  • get geoJSONBoundingBox(): undefined | BBox

    Gets the bounding box of the geoJSON geometry.

    Returns undefined | BBox

    The bounding box of the geoJSON geometry

  • get icon(): undefined | ImageMetaData

    Gets the URL of the icon for the map feature.

    Returns undefined | ImageMetaData

    The icon of the map feature.

  • get images(): ImageMetaData[]

    Gets the array of ImageMetaDatas associated with this map feature.

    Returns ImageMetaData[]

    An array of Image objects, or an empty array if no images exist.

  • Gets the array of Hyperlinks associated with this map feature.

    Returns Hyperlink[]

    An array of Hyperlink objects, or an empty array if no links exist.

  • get name(): string

    Gets the name of the map feature.

    Returns string

    The name of the map feature.

  • get nodes(): Node[]

    Gets the nodes (Node) associated with the connection.

    Returns Node[]

  • get type(): | "door"
    | "stairs"
    | "elevator"
    | "escalator"
    | "ramp"
    | "slide"
    | "portal"
    | "security"
    | "shuttle"
    | "ladder"

    Gets the type of the connection.

    Returns
        | "door"
        | "stairs"
        | "elevator"
        | "escalator"
        | "ramp"
        | "slide"
        | "portal"
        | "security"
        | "shuttle"
        | "ladder"

    The type of the connection.

Methods

  • Serializes the connection data to JSON.

    Returns {
        __type: string;
        coordinates: {
            __type: string;
            floorId: undefined | string;
            latitude: number;
            longitude: number;
            verticalOffset: number;
        }[];
        externalId: string;
        extra: undefined
        | Record<string, unknown>;
        floors: string[];
        id: string;
        name: string;
        type:
            | "door"
            | "stairs"
            | "elevator"
            | "escalator"
            | "ramp"
            | "slide"
            | "portal"
            | "security"
            | "shuttle"
            | "ladder";
    }

    An object representing the connection.

  • Checks if the provided instance is of type Connection.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is Connection

    True if the instance is a Connection, false otherwise.