Geolocation

The Geolocation API lets authorized web applications to access the location data provided by the device - obtained using either GPS or from the network environment. Apart from the one-off location query, it gives a way for the app to be notified about the location changes.

API glimpse

navigator.geolocation.getCurrentLocation(callback)
Runs one-off query for location with coordinates, accuracy, altitude & speed, if available.
navigator.geolocation.watchLocation(callback)
Sets up observing for location changes, invoking callback for every change.

Resources