LOCATION

Members

location.getCurrentLocation({ accuracy="", locationTimeout="" })

“get current device location”

Parameters:
  • accuracy (str) – “high” or “low”. Defaults to “low”. OPTIONAL
  • locationTimeout (str) – timeout of the request, in seconds. Defaults to 10s. OPTIONAL
Raises:

LOCATION_SERVICES_DISABLED: device’s location services are disabled

Raises:

GPS_DISABLED: gps is disabled

Raises:

NO_GEOLOCATION_SERVICES: device has no geolocation services

Raises:

LOCATION_TIMEOUT: location request took more than locationTimeout value

Return type:

location.CurrentLocationEvent

class location.CurrentLocationEvent
getLatitude()
Returns:current device’s latitude
getLongitude()
Returns:current device’s longitude