Skip to content

Commit

Permalink
fix: reference the correct function in readme
Browse files Browse the repository at this point in the history
The function returned is called `getPosition` not `getLocation`.

Fixes #1374
  • Loading branch information
no23reason committed Jul 10, 2023
1 parent f2c1ff7 commit f9cd616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ By default the component only sets position once. To watch the user's position a

If set, the `userDecisionTimeout` determines how much time (in milliseconds) we give the user to make the decision whether to allow to share their location or not. In Firefox, if the user declines to use their location, the Geolocation API call does not end with an error. Therefore we want to fallback to the error state if the user declines and the API does not tell us.

The location is obtained when the component mounts by default. If you want to prevent this and get the location later, set the `suppressLocationOnMount` to `true` and use the `getLocation` function returned by the hook to trigger the geolocation query manually.
The location is obtained when the component mounts by default. If you want to prevent this and get the location later, set the `suppressLocationOnMount` to `true` and use the `getPosition` function returned by the hook to trigger the geolocation query manually.

The `geolocationProvider` allows to specify alternative source of the geolocation API. This was added mainly for testing purposes, however feel free to use it if need be.

Expand Down

0 comments on commit f9cd616

Please sign in to comment.