@tauri-apps/plugin-geolocation
type Coordinates: object;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L12
type PermissionStatus: object;| 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: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L59 |
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: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L49 |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L41
type PermissionType: "location" | "coarseLocation";Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L62
type Position: object;| Name | Type | Description | Defined in |
|---|---|---|---|
coords | Coordinates | The GPD coordinates along with the accuracy of the data. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L72 |
timestamp | number | Creation time for these coordinates. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L68 |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L64
type PositionOptions: object;| 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: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L80 |
maximumAge | number | The maximum age in milliseconds of a possible cached position that is acceptable to return. Default: 0 Ignored on iOS | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L92 |
timeout | number | The maximum wait time in milliseconds for location updates. On Android the timeout gets ignored for getCurrentPosition. Ignored on iOS | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L86 |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L75
function checkPermissions(): Promise<PermissionStatus>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L128
function clearWatch(channelId): Promise<void>| Parameter | Type |
|---|---|
channelId | number |
Promise<void>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L122
function getCurrentPosition(options?): Promise<Position>| Parameter | Type |
|---|---|
options? | PositionOptions |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L114
function requestPermissions(permissions): Promise<PermissionStatus>| Parameter | Type |
|---|---|
permissions | null | PermissionType[] |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L132
function watchPosition(options, cb): Promise<number>| Parameter | Type |
|---|---|
options | PositionOptions |
cb | (location, error?) => void |
Promise<number>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/geolocation/guest-js/index.ts#L95
© 2025 Tauri Contributors. CC-BY / MIT