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

    Class Space

    A Space represents an area enclosed by walls, such as a hall or room. Spaces can be Interactive and have Labels and Markers added to them. Spaces can also be customized with a color, texture and hover color.

    Refer to the Spaces Guide for more information and interactive examples.

    Hierarchy (View Summary)

    Implements

    Index

    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 doors(): Door[]

      Gets the array of Doors associated with the space.

      Returns Door[]

      The doors array.

      Data Source: Maker - This property is only populated when using Maker credentials (API keys starting with mik_). Returns an empty array when using CMS/Enterprise credentials.

    • get enterpriseLocations(): EnterpriseLocation[]

      Gets the EnterpriseLocations attached to this space.

      Returns EnterpriseLocation[]

      An array of enterprise locations.

      Data Source: Enterprise - This property is only populated when using CMS/Enterprise credentials (clientId/clientSecret or API keys that do NOT start with mik_). Returns an empty array when using Maker credentials. For Maker data, access locations via LocationProfile.spaces instead.

    • 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 object associated with the space.

      Returns Floor

      The floor object.

      Will throw an error if the floor is not found.

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

      Gets the underlying GeoJSON Feature representation of this Space.

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

    • get images3D(): Image3DView[]

      Gets the 3D images anchored to this space.

      Returns Image3DView[]

      An array of Image3DView objects representing 3D images attached to this space.

    • get name(): string

      Gets the name of the map feature.

      Returns string

      The name of the map feature.

    Methods

    • Serializes the space data to JSON.

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

      An object representing the space.

    • Checks if the provided instance is of type Space.

      Parameters

      • instance: object

        The instance to check.

      Returns instance is Space

      True if the instance is a Space, false otherwise.