Handle a location timeout
A position request should not leave a user waiting forever. Set a realistic timeout and explain what the user can do if it expires.
What you will learn
- How
timeoutlimits the wait in milliseconds - How to identify a timeout error
- How to provide a manual fallback
No request has been made.
A timeout of 0 is not a useful production setting: it causes the request to fail immediately. Choose a limit that fits the feature and keep a fallback available.