Join Bill Weinman for an in-depth discussion in this video Handling errors, part of HTML5: Geolocation.
So the first thing we are going to do is we are going to write our little error…handler function, and again this is just very, very simple.…And it gets an error object, and that error object has a property called code,…which has the error.code.…So we are going to use a switch statement.…Then we are going to switch on the error.code. And the error object also has…these handy constants, so that we don't have to remember the numbers or write the…numbers, and we have this nice mnemonic reminder of what they all are.…
- Understanding how geolocation works
- Detecting geolocation support
- Getting coordinates
- Continuous tracking with watchPosition()
- Integrating geolocation with Google Maps