Class MapObject

A class representing generic map object data within the map.

It could represent various objects on the map, such as desks, chairs, etc.

MapObject appearance can be customized by changing the color or adding a texture to its top or sides. Refer to the Textures & Colors Guide for more information and interactive examples.

Hierarchy (View Summary)

Implements

Properties

id: string

The identity of the map data.

Accessors

  • 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 floor(): Floor

    Gets the Floor associated with the MapObject.

    Returns Floor

    The floor object.

    Will throw an error if the floor is not found.

  • get geoJSON(): {
        geometry: LineString
        | Polygon;
        properties: null;
        type: "Feature";
    }

    Gets the underlying GeoJSON Feature representation of this Object.

    Returns { geometry: LineString | Polygon; properties: null; type: "Feature" }

  • 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 type(): string

    Gets the type of the MapObject.

    Returns string

    The kind of the object.

Methods

  • Serializes the MapObject data to JSON.

    Returns {
        __type: string;
        center: {
            __type: string;
            floorId: undefined | string;
            latitude: number;
            longitude: number;
            verticalOffset: number;
        };
        floor: string;
        id: string;
        name: string;
        type: string;
    }

    An object representing the MapObject.

  • Checks if the provided instance is of type MapObject.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is MapObject

    True if the instance is a MapObject, false otherwise.