Join Bill Weinman for an in-depth discussion in this video Detecting geolocation support, part of HTML5: Geolocation in Depth.
And if that's found then we return that object and it gets set in this…global geo variable;…and if not then we return the undefined value.…So let's go ahead and run that in the browser.…Click on that there, and there it is:…"HTML5 Geolocation is supported."…So that's the message that's right here, "HTML5 Geolocation is supported."…Just to test it, sometimes what I will do is I misspell something on purpose.…I will just put that put that x in there and save that and when I load that back…up in the browser, you can see it says, "HTML5 Geolocation is not supported."…
- Understanding how geolocation works
- Detecting geolocation support
- Getting coordinates
- Continuous tracking with watchPosition()
- Integrating geolocation with Google Maps