@tauri-apps/plugin-geolocation
Type Aliases
Section titled “Type Aliases”Coordinates
Section titled “Coordinates”type Coordinates: object;Type declaration
Section titled “Type declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
accuracy |
number |
Accuracy level of the latitude and longitude coordinates in meters. | Source: undefined |
altitude |
number | null |
The altitude the user is at, if available. | Source: undefined |
altitudeAccuracy |
number | null |
Accuracy level of the altitude coordinate in meters, if available. Available on all iOS versions and on Android 8 and above. | Source: undefined |
heading |
number | null |
The heading the user is facing, if available. | Source: undefined |
latitude |
number |
Latitude in decimal degrees. | Source: undefined |
longitude |
number |
Longitude in decimal degrees. | Source: undefined |
speed |
number | null |
- | Source: undefined |
Source: undefined
PermissionStatus
Section titled “PermissionStatus”type PermissionStatus: object;Type declaration
Section titled “Type declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
coarseLocation |
PermissionState |
Permissions 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. |
Source: undefined |
location |
PermissionState |
Permission 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. | Source: undefined |
Source: undefined
PermissionType
Section titled “PermissionType”type PermissionType: "location" | "coarseLocation";Source: undefined
Position
Section titled “Position”type Position: object;Type declaration
Section titled “Type declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
coords |
Coordinates |
The GPD coordinates along with the accuracy of the data. | Source: undefined |
timestamp |
number |
Creation time for these coordinates. | Source: undefined |
Source: undefined
PositionOptions
Section titled “PositionOptions”type PositionOptions: object;Type declaration
Section titled “Type declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
enableHighAccuracy |
boolean |
High 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). |
Source: undefined |
maximumAge |
number |
The maximum age in milliseconds of a possible cached position that is acceptable to return. Default: 0 Ignored on iOS | Source: undefined |
timeout |
number |
The maximum wait time in milliseconds for location updates. On Android the timeout gets ignored for getCurrentPosition. Ignored on iOS | Source: undefined |
Source: undefined
Functions
Section titled “Functions”checkPermissions()
Section titled “checkPermissions()”function checkPermissions(): Promise<PermissionStatus>Returns
Section titled “Returns”Source: undefined
clearWatch()
Section titled “clearWatch()”function clearWatch(channelId): Promise<void>Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
channelId |
number |
Returns
Section titled “Returns”Promise<void>
Source: undefined
getCurrentPosition()
Section titled “getCurrentPosition()”function getCurrentPosition(options?): Promise<Position>Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
PositionOptions |
Returns
Section titled “Returns”Source: undefined
requestPermissions()
Section titled “requestPermissions()”function requestPermissions(permissions): Promise<PermissionStatus>Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
permissions |
null | PermissionType[] |
Returns
Section titled “Returns”Source: undefined
watchPosition()
Section titled “watchPosition()”function watchPosition(options, cb): Promise<number>Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
PositionOptions |
cb |
(location, error?) => void |
Returns
Section titled “Returns”Promise<number>
Source: undefined
Tauri 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站