Name
GeolocationError — an error while querying the user’s location
Synopsis
If an attempt to determine the user’s geographical position fails, your error callback function will be invoked with a GeolocationError object that describes what went wrong.
Constants
These constants are the possible values of the code property:
unsigned shortPERMISSION_DENIED= 1The user did not grant permission to share her or his location.
unsigned shortPOSITION_UNAVAILABLE= 2The location could not be determined for an unspecified reason. This could be caused by a network error, for example.
unsigned shortTIMEOUT= 3The location could not be determined within the time allotted (see the
timeoutoption described in Geolocation).
Properties
readonly unsigned shortcodeThis property will have one of the three values above.
readonly stringmessageA message that provides more details about the error. The message is intended to aid with debugging and is not suitable for display to end users.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access