Browser APIs
useGeolocation
About
A hook to provide the geolocation info on client side.
Examples
Getting geolocation in a component
Getting geolocation in a component on some condition
Arguments
The argument is an object with the following optional items:
| Argument value | Type | Description | 
|---|---|---|
| options.enableHighAccuracy | boolean | enable high accuracy if true | 
| options.timeout | number | timeout in milliseconds | 
| options.maximumAge | number | maximumAge in milliseconds | 
| options.when | boolean | this hook will run when whenistrue | 
Returns
Returns an object with following items: