Class Mappedin

Hierarchy

  • PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT>
    • Mappedin

Constructors

Properties

analytics: IAnalytics
categories: MappedinCategory[]
currentLanguage: {
    code: string;
    name: string;
}

Type declaration

  • code: string
  • name: string
events: MappedinEvent[]
imageBinaries?: Map<string, Uint8Array>
images: any
locationStates: MappedinLocationState[]
locations: MappedinLocation[]
mapGroups: MappedinMapGroup[]
maps: MappedinMap[]
nodes: MappedinNode[]
options: any
perspective: any
polygons: MappedinPolygon[]
rankings?: MappedinRankings
scenes: any
themes: MappedinTheme[]
things: any
updatedAt?: string
vortexes: MappedinVortex[]

Methods

  • Change the language of the venue. This will trigger a re-fetch of the venue data and emit a {GET_VENUE_EVENT.LANGUAGE_CHANGED} event.

    Parameters

    • languageCode: string

      The language code to change to

    • Optional cache: boolean

      Whether or not to cache the current language so it doesn't need to be re-fetched

    Returns Promise<void>

  • Returns Promise<void>

  • Type Parameters

    Parameters

    • name: T
    • id: I

    Returns null | TAccessors[T]

  • Experimental

    Hydrate the Mappedin instance using a response from either Mappedin.toString, getVenueBundle or by downloading the bundle manually

    Parameters

    • mappedinSerializableData: string | Record<string, unknown>

      Mappedin data that was serialized or exported as JSON

    • Optional shouldPopulateBundledImagesAsBlobs: boolean

      Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default

    Returns Promise<undefined>

  • Type Parameters

    • EVENT_NAME extends LANGUAGE_CHANGED

    Parameters

    • eventName: EVENT_NAME
    • fn: ((payload) => void)
        • (payload): void
        • Parameters

          • payload: GET_VENUE_PAYLOAD[EVENT_NAME]

          Returns void

    Returns void

  • Type Parameters

    • EVENT_NAME extends LANGUAGE_CHANGED

    Parameters

    • eventName: EVENT_NAME
    • fn: ((payload) => void)
        • (payload): void
        • Parameters

          • payload: GET_VENUE_PAYLOAD[EVENT_NAME] extends {
                    data: null;
                }
                ? any[any]["data"]
                : GET_VENUE_PAYLOAD[EVENT_NAME]

          Returns void

    Returns void

  • Export venue data to JSON (for storage, encryption, etc)

    Returns any

  • Export venue data to String

    Returns string