GeoXpCore provides content playback coordination based on user location

Constructors

  • Constructor for GeoXpCore Class

    Parameters

    • config: GeoXpCoreConfig

      GeoXpCore configuration

    • Optionaloptions: { throwErrors?: boolean }

      Options for GeoXpCore

      • OptionalthrowErrors?: boolean

        Whether errors should be throw or not. Throw is default behavior

    Returns GeoXpCore

    GeoXpCore singleton instance

Properties

setStoredVisitedSpots?: (
    patternId: string,
    visited: string[],
) => void | Promise<void>

Function to set stored visited spots

Type declaration

    • (patternId: string, visited: string[]): void | Promise<void>
    • Parameters

      • patternId: string

        Id of pattern for storage retrieval

      • visited: string[]

        array of visited spotIds to store for a specific pattern

      Returns void | Promise<void>

Accessors

  • get getStoredVisitedSpots(): undefined | GetVisitedSpotsCallback
  • Returns undefined | GetVisitedSpotsCallback

  • set getStoredVisitedSpots(callback: GetVisitedSpotsCallback): void
  • Function to get stored visited spots

    Parameters

    • callback: GetVisitedSpotsCallback

      A function that:

      • takes the ID of pattern for storage retrieval as argument
      • returns an array of stored visited spotIds for a specific pattern
      • it can also return a Promise if using an asyncronous storage method (e.g. Node fs)
      • it returns undefined is no entries correspond to the provided ID

    Returns void

Methods

  • Checks if manual mode is available Rules are gps accuracy is really bad not too far away

    Parameters

    Returns null | string

    error

  • Disables specific pattern

    Parameters

    • patternId: string

      pattern id to disable

    Returns void

  • Disables all patterns in the configuration. Iterates through the list of patterns in the configuration and calls disablePattern on each one.

    Returns void

  • Enables specific pattern

    Parameters

    • patternId: string

      pattern id to enable

    Returns void

  • Enables all patterns that are not marked as disabled in the configuration. Iterates through the list of patterns in the configuration and calls enablePattern on each enabled pattern.

    Returns void

  • Forces spot activation Forces other spots deactivation unless overlapping

    Parameters

    Returns null | string

    error

  • Geolocation update This method triggers the spot analysis

    Phased analysys

    1. deactivate spots
    2. activate new spots, prefetch incoming spots
    3. activate spots to replay or visited
    4. set first time inside (to avoid event duplication)

    Parameters

    Returns void

  • Gets visited spots for a given pattern If not pattern is provided, gets visited spots for all patterns

    Parameters

    • OptionalpatternId: string

      pattern id

    Returns undefined | string[]

    array of visited spots

  • Checks to see if there's any active spots

    Returns boolean

    at least one spot is active

  • Event wrapper off

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, GeoXpCoreEvent>

      'incoming' | 'active' | 'inactive' | 'visited' | 'last' | 'complete'

    • listener: Listener<K, GeoXpCoreEvent>

      event listener

    Returns void

  • Event wrapper on

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, GeoXpCoreEvent>

      'incoming' | 'active' | 'inactive' | 'visited' | 'last' | 'complete'

    • listener: Listener<K, GeoXpCoreEvent>

      event listener

    Returns void

  • Event wrapper once

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, GeoXpCoreEvent>

      'incoming' | 'active' | 'inactive' | 'visited' | 'last' | 'complete'

    • listener: Listener<K, GeoXpCoreEvent>

      event listener

    Returns void

  • Marks spots as unvisited. If no spot id provided, marks all inside spots as unvisited

    Parameters

    • Optional_spot: string | GeoXpSpot

      spot to unvisit

    Returns void

  • Confirm spot content activation

    Parameters

    Returns void

  • Confirm spot deactivation (either stopped or finished)

    Parameters

    Returns void

  • Stops and removes any forced spot

    Returns void

MMNEPVFCICPMFPCPTTAAATR