location

Accessing location

This module gives access to the devices’s location.

location.LOCATION_ACCURACY_BEST = -1

The best level of accuracy available.

location.LOCATION_ACCURACY_BEST_FOR_NAVIGATION = -2

The highest possible accuracy that uses additional sensor data to facilitate navigation apps.

location.LOCATION_ACCURACY_HUNDRED_METERS = 100

Accurate to within one hundred meters.

location.LOCATION_ACCURACY_KILOMETER = 1000

Accurate to the nearest kilometer.

location.LOCATION_ACCURACY_NEAREST_TEN_METERS = 10

Accurate to within ten meters of the desired target.

location.LOCATION_ACCURACY_THREE_KILOMETERS = 3000

Accurate to the nearest three kilometers.

class location.Location(longitude, latitude, altitude)

A tuple containing data about longitude, latitude and altitude.

altitude

Alias for field number 2

latitude

Alias for field number 1

longitude

Alias for field number 0

location.accuracy = -1

The number of meters from the original geographic coordinate that could yield the user’s actual location.

location.get_location() → location.Location

Returns a tuple with current longitude, latitude and altitude.

Return type:Location
location.start_updating()

Starts receiving location updates. Call this before calling get_location().

location.stop_updating()

Stops receiving location updates.