A LocationProfile 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('location-profile');

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

EnterpriseLocation for the CMS/Enterprise equivalent.

Hierarchy

  • default
    • LocationProfile

Implements

Properties

description?: string
externalId?: string
extra?: Record<string, unknown>

Additional user defined data. The type is unknown, so it is recommended to validate the data before use.

Only available when loading MVFv3 data.

const mapData = await getMapData({
...
mvfVersion: '3.0.0',
});

const locationProfile = mapData.getById('location-profile', id);
if (typeof locationProfile?.extra?.myProperty === 'string') {
// Do something
}

The location's icon to display. Will be either a logo, category, or image

uri

id: string

The identity of the map metadata.

images: ImageMetaData[]

The location's pictures

links: Hyperlink[]

Web links for the location

logo?: string

The location's logo

uri

Use the logoImage property instead

logoImage?: ImageMetaData

An image representing the location's logo

name: string
phone?: string
searchTags?: string[]

Additional keywords to match against when searching. These should not be used for display.

social: LocationSocial[]

The location's social media links.

website?: Hyperlink

The location's website

Accessors

  • get areas(): Area[]

    Gets the Areas associated with the location.

    Returns Area[]

    The areas array.

  • get categories(): LocationCategory[]

    Gets the LocationCategorys associated with the location.

    Returns LocationCategory[]

    The location categories array.

    Data Source: Maker - This property is only available when using Maker credentials.

  • get doors(): Door[]

    Gets the Doors associated with the location.

    Returns Door[]

    The doors array.

  • get spaces(): Space[]

    Gets the Spaces associated with the location.

    Returns Space[]

    The spaces array.

Methods

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

  • Checks if the provided instance is of type LocationProfile.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is LocationProfile

    True if the instance is a EnterpriseLocation, false otherwise.