HTML and CSS Reference
In-Depth Information
Figure 7-2. Location request
This presents a problem, as you should expect that some users might not wish
to share their current location and might tap the decline button; or there could
simply be an issue with retrieving the current location of the user. This can be
handled with an error event handler, which is the second parameter of the
getCurrentPosition() method. In order to handle errors in retrieving the user's
current location, you must create an error handler, which will accept the error
var handleLocationError = function(error){
The error object is part of the PositionError interface, and has the properties
shown in Table 7-2.
Search WWH ::

Custom Search