Chapter 14. Making your HTML location-aware

The Geolocation application programming interface (API) provides an interface with device location information such as latitude and longitude; you can use the Geolocation API to make your applications location-aware. Imagine creating an application that enables the user to enter favorite information, such as where to drink coffee or shop for computers. As the user gets close to a favorite place such as a coffee shop or a computer store, the device displays a map with the location. Maybe the coffee shop could provide incentives to motivate the user to stop by for a quick cup of coffee.

The API is generic enough to interface with many underlying location information sources such as the Global Positioning ...

Get Training Guide: Programming in HTML5 with JavaScript and CSS3 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.