Tool for monitoring the users geo position.

Properties

available: boolean = false

Will be set by the component itself. Needs to be checked before calling any function.

Can change when user denies access.

initialised: boolean = false

Will be set by the component itself. Needs to be checked before calling any function.

Methods

  • Ends monitoring the users position.

    Returns Promise<void>

  • Returns the last saved position of the user [longitude, latitude]. Returns immediately.

    Returns Promise<[number, number]>

  • Returns the users position [longitude, latitude].

    Returns Promise<[number, number]>

  • Initialises the component. Sets "initialised" and "available". Called by the component itself but can be called again if circumstances change.

    Returns Promise<void>

  • Starts monitoring the users position. Returns the current position [longitude, latitude]. Fires "hyloNewGeoLocation" when the position changed.

    Returns Promise<[number, number]>

Events

hyloNewGeoLocation: EventEmitter<[number, number]>

Triggered every time a new position is calculated. Emits [longitude, latitude].

Generated using TypeDoc