HTML5: Exception handling with the Geolocation API

added by JefClaes
12/26/2010 1:43:46 PM

0 Kicks, 65 Views

In my previous post on the Geolocation API I passed in a PositionErrorCallback to the geolocation.getCurrentPosition() method. When I received this callback I displayed a generic message informing the user something went wrong. In real-world scenarios you probably want the message to be more specific. You might also want to call a specific fallback method depending on what went wrong. This is where the PositionError argument of the PositionErrorCallback comes in handy. This object has two properties:...


0 comments