HTML: Markup language
CSS: Styling language
JavaScript: Scripting language
Web APIs: Programming interfaces
All web technology
Learn web development
Discover our tools
Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The GeolocationPositionError interface represents the reason of an error occurring when using the geolocating device.
GeolocationPositionError
The GeolocationPositionError interface doesn't inherit any property.
GeolocationPositionError.code
Returns an unsigned short representing the error code. The following values are possible:
unsigned short
1
PERMISSION_DENIED
2
POSITION_UNAVAILABLE
3
TIMEOUT
GeolocationPositionError.message
Returns a human-readable string describing the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface.
The GeolocationPositionError interface neither implements nor inherits any method.
Enable JavaScript to view this browser compatibility table.
Geolocation