Class MappedinLocation

A MappedinLocation is something like a store or washroom on a MappedinMap. It has an ID and will be linked to zero or more MappedinNodes and MappedinPolygons.

A Location's Nodes and Polygons can be on multiple Maps, or in multiple non-adjacent places on the same Map. For example, all washroom at a given Venue could belong to one Location, or a department store could live on multiple floors. A Washroom Location might a have a few Polygons spread throughout the Venue for each one that exists, but a single store might just have one presence, and therefore one Polygon. Some Locations just have a single point and only have Nodes.

A Location can have more properties (typically things like 'name', 'externalId', 'type', 'categories', 'description', 'logo', etc).

The Mappedin 'things' object is where you would specify what properties you want to download for Locations. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.

See below for an example a 'things' object with available Location properties specified:

things: {
venue: [],
locations: ['venue', 'name', 'type', 'icon', 'logo', 'language', 'externalId', 'description', 'categories', 'phone', 'operationHours', 'social', 'tags', 'parents', 'sortOrder'],
categories: [],
maps: []
}

Hierarchy

Constructors

Properties

__type: "MappedinLocation" = "MappedinLocation"
amenity?: string
color?: TColor
description?: string
detailsUrl?: string
externalId?: string
filterFlags?: string[]
gallery?: TGalleryImage[]
id: string
logo?: TImage
name: string
operationHours?: TOpeningHours[]
phone?: TPhone
picture?: TPicture
shortName?: string
showLabelWhenImagePresent?: boolean
showSmartLabelWhenImagePresent?: boolean
siblingGroups?: TSiblingGroup[]
social?: TSocial
sortOrder?: number
states: undefined | TState[]
tags?: string[]
type: string
__type: "MappedinLocation" = "MappedinLocation"

Accessors

  • get instances(): MappedinLocation[]
  • 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, we have put 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.

    Returns MappedinLocation[]

  • get parent(): undefined | MappedinLocation
  • Parent of this Location, if any. Used in cases where one Location is inside another, more "important" Location.

    Returns undefined | MappedinLocation

  • set parent(parent): void
  • Parameters

    Returns void

Methods

  • Returns any

  • Parameters

    • mappedin: Mappedin
    • Optional hydrateData: any

    Returns Promise<void>