Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Locator

Index

Constructors

constructor

Properties

Private Readonly canEverGeolocate

canEverGeolocate: boolean

Private currentWatchId

currentWatchId: Option<number>

Private latestAccuracyRadius

latestAccuracyRadius: Option<number>

Private latestPosition

latestPosition: Option<LatLng>

Private onUpdateStateHandles

onUpdateStateHandles: ((oldState: PositionState, newState: PositionState, position: Option<LatLng>, positionAccuracyRadius: Option<number>) => void)[]

Private positionState

positionState: PositionState

Static inject

inject: readonly ["logger", "settings"] = ...

Methods

addStateUpdateHandler

  • addStateUpdateHandler(onUpdateState: (oldState: PositionState, newState: PositionState, position: Option<LatLng>, accuracyRadius: Option<number>) => void): void
  • Parameters

    Returns void

Private disengage

  • disengage(): void
  • Returns void

getCanEverGeolocate

  • getCanEverGeolocate(): boolean
  • Returns boolean

getLatestPosition

  • getLatestPosition(): Option<LatLng>
  • Returns Option<LatLng>

getPositionState

Private initialize

  • initialize(): void
  • Returns void

isNearChurchill

  • isNearChurchill(): boolean
  • Returns boolean

Private onPositionError

  • onPositionError(error: GeolocationPositionError): void
  • Parameters

    • error: GeolocationPositionError

    Returns void

Private onPositionUpdate

  • onPositionUpdate(latestPosition: GeolocationPosition): void
  • Parameters

    • latestPosition: GeolocationPosition

    Returns void

Private onUpdateState

  • onUpdateState(newState: PositionState, position: Option<LatLng>, accuracyRadius: Option<number>): void
  • Call state change handlers, then update the state to the new state.

    Parameters

    • newState: PositionState
    • position: Option<LatLng>
    • accuracyRadius: Option<number>

    Returns void

Private setPositionStateNearChurchill

  • setPositionStateNearChurchill(coords: GeolocationCoordinates): void
  • Parameters

    • coords: GeolocationCoordinates

    Returns void

Private setPositionStateNotNearChurchill

  • setPositionStateNotNearChurchill(): void
  • Returns void

Private setPositionStateUnknown

  • setPositionStateUnknown(): void
  • Returns void

Private tryInitializeIfNeeded

  • tryInitializeIfNeeded(): void
  • Returns void

Static Private latLongNearChurchill

  • latLongNearChurchill(latitude: number, longitude: number): boolean
  • Determines if a lat-long coordinate is near Churchill. Any point within Churchill's campus (school building, parking lots, fields, etc.) must be near Churchill. Points that are physically close to Churchill but not necesarily on campus may be considered near. Points far from Churchill must never be considered near.

    Parameters

    • latitude: number
    • longitude: number

    Returns boolean

Static Private latLongToChurchillSpace

  • latLongToChurchillSpace(latitude: number, longitude: number): LatLng
  • Parameters

    • latitude: number
    • longitude: number

    Returns LatLng

Static Private metersToFeet

  • metersToFeet(meters: number): number
  • Parameters

    • meters: number

    Returns number

Generated using TypeDoc