Skip to content

Location

Fetches your location.

Uses GPS, WiFi and cellular hardware to determine your location. The first time you use the API, the application will prompt you to authorize access to your location. If you do not authorize access, the application cannot fetch your location. You can change this later from the system settings.

+current

Fetches your location.

Your location is fetched using GPS, WiFi and cellular hardware. The object carried by the promise includes the latitude, longitude and altitude as well as the horizontal and vertical accuracy measured in meters.

static current(): Promise<{string: number}>

+setAccuracyToBest

Uses best accuracy. This is default.

Set this when you want to achieve the best possible accuracy when retrieving your location. This is the default accuracy.

static setAccuracyToBest()

+setAccuracyToTenMeters

Sets accuracy to within ten meters.

static setAccuracyToTenMeters()

+setAccuracyToHundredMeters

Sets accuracy to within hundred meters.

static setAccuracyToHundredMeters()

+setAccuracyToKilometer

Sets accuracy to within one kilometer.

static setAccuracyToKilometer()

+setAccuracyToThreeKilometers

Sets accuracy to within three kilometersb.

static setAccuracyToThreeKilometers()