Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Device Access

User location

The Geolocation API lets you find out where the user is, always with the user's consent. This functionality could be used as part of user queries, e.g. to guide someone to a destination point. It could also be used for 'geo- tagging' some content the user has created, e.g. to mark where a photo was taken.

The Geolocation API also lets you watch where the user is and keep tabs on them as they move around, always with the user’s consent (and only whilst the page is open), this opens up a lot of interesting usecases - such as integrating with backend systems to prepare an order for collection if the user is close by.

There are a lot of things that you need to be aware of when using using the Geolocation API and this guide will walk you through the common use-cases and solutions.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License , and code samples are licensed under the Apache 2.0 License . For details, see our Site Policies .