Skip to content

geolocation

type Coordinates: object;
NameTypeDescriptionDefined in
accuracynumberAccuracy level of the latitude and longitude coordinates in meters.
altitudenumber | nullThe altitude the user is at, if available.
altitudeAccuracynumber | nullAccuracy level of the altitude coordinate in meters, if available. Available on all iOS versions and on Android 8 and above.
headingnumber | nullThe heading the user is facing, if available.
latitudenumberLatitude in decimal degrees.
longitudenumberLongitude in decimal degrees.
speednumber | null-

type PermissionStatus: object;
NameTypeDescriptionDefined in
coarseLocationPermissionStatePermissions state for the coarseLoaction alias. On Android it requests/checks ACCESS_COARSE_LOCATION. On Android 12+, users can choose between Approximate location (ACCESS_COARSE_LOCATION) and Precise location (ACCESS_FINE_LOCATION). On iOS it will have the same value as the location alias.
locationPermissionStatePermission state for the location alias. On Android it requests/checks both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions. On iOS it requests/checks location permissions.

type PermissionType: "location" | "coarseLocation";

type Position: object;
NameTypeDescriptionDefined in
coordsCoordinatesThe GPD coordinates along with the accuracy of the data.
timestampnumberCreation time for these coordinates.

type PositionOptions: object;
NameTypeDescriptionDefined in
enableHighAccuracybooleanHigh accuracy mode (such as GPS, if available) Will be ignored on Android 12+ if users didn’t grant the ACCESS_FINE_LOCATION permission (coarseLocation permission).
maximumAgenumberThe maximum age in milliseconds of a possible cached position that is acceptable to return. Default: 0 Ignored on iOS
timeoutnumberThe maximum wait time in milliseconds for location updates. On Android the timeout gets ignored for getCurrentPosition. Ignored on iOS

function checkPermissions(): Promise<PermissionStatus>

Promise<PermissionStatus>


function clearWatch(channelId): Promise<void>
ParameterType
channelIdnumber

Promise<void>


function getCurrentPosition(options?): Promise<Position>
ParameterType
options?PositionOptions

Promise<Position>


function requestPermissions(permissions): Promise<PermissionStatus>
ParameterType
permissionsnull | PermissionType[]

Promise<PermissionStatus>


function watchPosition(options, cb): Promise<number>
ParameterType
optionsPositionOptions
cb(location, error?) => void

Promise<number>