O'Reilly logo

HTML5: Your visual blueprint™ for designing rich web pages and applications by Adam McDaniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

UNDERSTANDING GEOLOCATION AND GPS SERVICES

The Geolocation API, a new feature for HTML5, is managed by an official W3C specification. It allows for a standard way for websites to access location-specific data about the user, provided that the user consents to the request and the hardware support is available. This process uses multiple methods to retrieve the user’s coordinates, via GPS or other geolocation services, and makes the information available over JavaScript.

The website can then choose to process that information in the user’s web browser or send it using an Ajax or form submission callback to the web server for server-side processing.

This is an invaluable tool used by many location-specific websites, such as Google Maps, foursquare, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required