A hook to provide the geolocation info on client side.
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 when is true |
Returns an object with following items:
{lat?: number;lng?: number;isError: boolean;message: string;}
Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!