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

    Class EnterpriseLocation

    An EnterpriseLocation contains metadata about a location, such as its name, description, logo, phone number, social media links, hours of operation and more. They can be accessed using the MapData.getByType method as shown below.

    const allLocations = mapData.getByType('enterprise-location');
    

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

    Data Source: Enterprise - This class is only available when using CMS/Enterprise credentials (clientId/clientSecret or API keys that do NOT start with mik_). When using Maker credentials (keys starting with mik_), use LocationProfile instead.

    LocationProfile for the Maker equivalent.

    Hierarchy

    • default
      • EnterpriseLocation

    Implements

    • Omit<
          MVFEnterpriseLocation,
          "polygons"
          | "nodes"
          | "links"
          | "spaces"
          | "categories",
      >
    • IFocusable
    • INavigatable
    Index

    Properties

    amenity?: string

    The amenity of the location.

    description?: string

    The description of the location.

    externalId: string = ''

    The external ID of the location.

    extra?: Record<string, unknown>

    Extra properties of the location.

    gallery?: {
        caption?: string | null;
        embeddedUrl?: string | null;
        image: string;
    }[]

    The gallery of the location.

    hidden: boolean = false

    Whether the location has been marked as hidden.

    id: string

    The identity of the map metadata.

    instances?: EnterpriseLocation[]

    Specific instances of this location with different properties. Typically, there will be at least one node or polygon defined, plus one or more other properties that are different from the parent. The remaining properties will be the same as the parent.

    For example, suppose there is a location like this:

    {
    "id": "location-id-1",
    "name": "Location 1",
    "nodes": ["node-1", "node-2"],
    "polygons": ["polygon-1", "polygon-2"],
    "externalId": "externalId-1",
    "description": "Description 1",
    }

    (Note that for clarity, this example puts strings in for nodes and polygons, but in practice they would be objects.)

    Then suppose it had an instances array that contained an object that looked like this:

    {
    "id": "instance-id-1",
    "name": "Location 1 - A",
    "nodes": ["node-1"],
    "polygons": ["polygon-1"],
    "externalId": "externalId-1-A",
    "description": "Description 1",
    }

    This says "Location 1" is the parent location, and "Location 1 - A" is an instance of it. The instance has a different name, and a different external ID, and it only applies to node node-1 and polygon polygon-1. The ID will always be different, but other properties (like the description) are the same as the parent.

    Example use cases:

    • A Mall may have a location with two nodes and one polygon. It may then have an instance with one of the nodes, and operating hours that are different from the parent. This indicates that this instance is an entrance for the location that is accessible at different times, perhaps for an interior mall entrance, when the main location (and other, exterior entrance) is open later than the rest of the mall.
    • An airport may have a location with several polygons and nodes, and an instance for each node (and corresponding polygon, if any) with a different siblingGroup. The location in the sibling group may be the airport terminal, or airside vs landside. This would allow an application to show the location once in a search result, but offer UX to select the instance that is in the right terminal.

    Note: Instances are actual EnterpriseLocations. This means they have all the properties of a normal EnterpriseLocation, including an instances property, that will always be undefined. They also do NOT have a parent property, or any other explicit reference to the parent location. These instances are only referenced from their parent location, and will not show up in other places in the map data. However, they should otherwise behave like normal EnterpriseLocations, being targetable for things like navigation and focus.

    logo?: string

    A URL to the logo of the location.

    name: string = ''

    The name of the location.

    operationHours?: OperationHours[]

    The operation hours of the location.

    phone?: { extension?: string; number: string }

    The phone number of the location.

    picture?: string

    A URL to the picture of the location.

    primaryCategory?: string

    The main category of the location. It must be one of the categories in the Location's categories array.

    shortName?: string

    The short name of the location.

    showFloatingLabelWhenImagePresent?: boolean

    Whether to show the floating label when an image is present.

    showLogo?: boolean

    Whether to show the logo.

    siblingGroups?: SiblingGroup[]

    The sibling groups of the location.

    social?: {
        facebook?: string;
        instagram?: string;
        twitter?: string;
        website?: string;
    }

    The social media links of the location.

    sortOrder: number = -1

    The sort order of the location.

    states?: LocationState[]

    The LocationStates of the location.

    tags?: string[]

    The tags of the location.

    type: string = ''

    The type of the location.

    Accessors

    Methods

    • Serializes the EnterpriseLocation data to JSON.

      Returns { __type: string; id: string; name: string }

      An object representing the EnterpriseLocation.

    • Checks if the provided instance is of type EnterpriseLocation.

      Parameters

      • instance: object

        The instance to check.

      Returns instance is EnterpriseLocation

      True if the instance is a EnterpriseLocation, false otherwise.