Chapter 4. Using the HTML5 Geolocation API
Let's say you want to create a web application that offers discounts and special deals on running shoes in stores that your application's users are within walking (or running) distance away from. Using the HTML5 Geolocation API, you can request users to share their location and, if they agree, you can provide them with instructions on how to get to a nearby store to pick up a new pair of shoes at a discounted rate.
Another example of the use of HTML5 Geolocation could be an application that tracks how far you have run (or walked). You can picture using an application in a browser on a mobile phone that you turn on when you start a run. While you're on the move, the application tracks how far you have run. ...
Get Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.