{{
+
+ {{
JSON.stringify(
{
coords: {
@@ -24,4 +25,11 @@ const { coords, locatedAt, error } = useGeolocation()
2,
)
}}
+
+
+
diff --git a/packages/core/useGeolocation/index.md b/packages/core/useGeolocation/index.md
index 91273c0f767..cf1867c527b 100644
--- a/packages/core/useGeolocation/index.md
+++ b/packages/core/useGeolocation/index.md
@@ -11,7 +11,7 @@ Reactive [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geol
```js
import { useGeolocation } from '@vueuse/core'
-const { coords, locatedAt, error } = useGeolocation()
+const { coords, locatedAt, error, resume, pause } = useGeolocation()
```
| State | Type | Description |
@@ -19,6 +19,8 @@ const { coords, locatedAt, error } = useGeolocation()
| coords | [`Coordinates`](https://developer.mozilla.org/en-US/docs/Web/API/Coordinates) | information about the position retrieved like the latitude and longitude |
| locatedAt | `Date` | The time of the last geolocation call |
| error | `string` | An error message in case geolocation API fails. |
+| resume | `function` | Control function to resume updating geolocation |
+| pause | `function` | Control function to pause updating geolocation |
## Config
diff --git a/packages/core/useGeolocation/index.ts b/packages/core/useGeolocation/index.ts
index b747ea4c1ed..bd8696344f1 100644
--- a/packages/core/useGeolocation/index.ts
+++ b/packages/core/useGeolocation/index.ts
@@ -7,7 +7,9 @@ import type { ConfigurableNavigator } from '../_configurable'
import { defaultNavigator } from '../_configurable'
import { useSupported } from '../useSupported'
-export interface UseGeolocationOptions extends Partial