The Geolocation API

Contact Us or call 1-877-932-8228
The Geolocation API

The Geolocation API

One can easily see the value of location-aware websites; increasingly, we rely on our phones to find the nearest gas station, restaurant, or shopping center. As we move through this lesson, we will explore how location-aware code might enhance the user experience for visitors to the Nan & Bob's site.

The World Wide Web Consortium (W3C) has worked to standardize a system by which developers can retrieve a user's location. Based in part on Google Gears, the API is now widely supported (see below for specifics) and offers a device-independent system for accessing the user's latitude and longitude via JavaScript.

Next