Fork me on GitHub
Show:

GeolocateServiceInterface

Summary

Methods

clearWatch

Syntax

clearWatch

()

Summary

Stop watching for a changed position.

getCurrentPosition

Syntax

getCurrentPosition

() Promise

Summary

Returns:

Promise:

A promise to retrieve the user's current position. Promise resolves with a {aeris.geolocate.results.GeolocatePosition} object. Promise rejects with a {aeris.geolocate.errors.GeolocateServiceError} object.

isSupported

Syntax

isSupported

() Boolean static

Summary

Returns:

Boolean:

Whether the geolocation service is supported.

watchPosition

Syntax

watchPosition

(
  • onsuccess
  • onerror
  • opt_options
)

Summary

Parameters:

  • onsuccess Function

    A callback for when the user's position changes. Receives a {aeris.geolocate.results.GeolocatePosition} object.

  • onerror Function

    An error callback. Receives a {aeris.geolocate.errors.GeolocateServiceError} object.

  • opt_options Object=
    • interval Number=

      Interval at which to check for a changed location. This will be ignored if using the native HTML5 geolocation API.