Computer >> Computer tutorials >  >> Programming >> Javascript

Error Codes returned in the PositionError object in HTML5 Geolocation


The following are the error codes:

Code
Constant
Description
0UNKNOWN_ERROR
The method failed to retrieve the location of the device due to an unknown error.
1PERMISSION_DENIED
The method failed to retrieve the location of the device because the application does not have permission to use the Location Service.
2POSITION_UNAVAILABLE
The location of the device could not be determined.
3TIMEOUT
The method was unable to retrieve the location information within the specified maximum timeout interval.