You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> -_first element_: is the location object with two properties: __isSupported__ and __position__.
62
+
> -_second element_: function to observe location changes and it receives one param __successCallback__ and two optional params __errorCallback__ and __options__.
63
+
> -_third element_: function to cancel previous observing location changes.
* **`useGeolocation`**: Hook to use user's geographic location. Refer to [GeoLocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API).
7
+
* @param {Object} opts - options to use geolocation.
8
+
* @param {PositionOptions} [opts.locationOptions] - An optional object which provides options for retrieval of the position data.
9
+
* @param {boolean} [opts.mode] - it establishes how to obtain the geographic location:
10
+
* - __current__: it gets the location when invoked.
11
+
* - __observer__: it gets the current position every time it changes.
12
+
* - __manual__: to obtain the location it need to invoke functions returned from hook.
13
+
* @param {GeolocationPositionError} [opts.onError] - callback that will be executed if there will be errors.
0 commit comments