The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude.

6 Use-Cases and Requirements

6.1 Use-Cases

6.1.1 Find points of interest in the user’s area

Someone visiting a foreign city could access a Web application that allows users to search or browse through a database of tourist attractions. Using the Geolocation API, the Web application has access to the user’s approximate position and it is therefore able to rank the search results by proximity to the user’s location.

6.1.2 Annotating content with location information

A group of friends is hiking through the Scottish highlands. Some of them write short notes and take pictures at various points throughout the journey and store them using a Web application that can work offline on their hand-held devices. Whenever they add new content, the application automatically tags it with location data from the Geolocation API (which, in turn, uses the on-board GPS device). Every time they reach a town or a village, and they are again within network coverage, the application automatically uploads their notes and pictures to a popular blogging Web site, which uses the geolocation data to construct links that point to a mapping service. Users who follow the group’s trip can click on these links to see a satellite view of the area where the notes were written and the pictures were taken. Another example is a life blog where a user creates content (e.g. images, video, audio) that records her every day experiences. This content can be automatically annotated with information such as time, geographic position or even the user’s emotional state at the time of the recording.

6.1.3 Show the user’s position on a map

A user finds herself in an unfamiliar city area. She wants to check her position so she uses her hand-held device to navigate to a Web-based mapping application that can pinpoint her exact location on the city map using the Geolocation API. She then asks the Web application to provide driving directions from her current position to her desired destination.

6.1.4 Turn-by-turn route navigation

A mapping application can help the user navigate along a route by providing detailed turn-by-turn directions. The application does this by registering with the Geolocation API to receive repeated location updates of the user’s position. These updates are delivered as soon as the implementing User Agent determines that the position of the user has changed, which allows the application to anticipate any changes of direction that the user might need to do.

6.1.5 Alerts when points of interest are in the user’s vicinity

A tour-guide Web application can use the Geolocation API to monitor the user’s position and trigger visual or audio notifications when interesting places are in the vicinity. An online task management system can trigger reminders when the user is in the proximity of landmarks that are associated with certain tasks.

6.1.6 Up-to-date local information

A widget-like Web application that shows the weather or news that are relevant to the user’s current area can use the Geolocation API to register for location updates. If the user’s position changes, the widget can adapt the content accordingly.

6.1.7 Location-tagged status updates in social networking applications

A social network application allows its users to automatically tag their status updates with location information. It does this by monitoring the user’s position with the Geolocation API. Each user can control the granularity of the location information (e.g. city or neighbourhood level) that is shared with the other users. Any user can also track his network of friends and get real-time updates about their current location.

6.2 Requirements

6.2.1 The Geolocation API must provide location data in terms of a pair of latitude and longitude coordinates.

6.2.2 The Geolocation API must provide information about the accuracy of the retrieved location data.

6.2.3 The Geolocation API must support « one-shot » position updates.

6.2.4 The Geolocation API must allow an application to register to receive updates when the position of the hosting device changes.

6.2.5 The Geolocation API must allow an application to cheaply query the last known position.

6.2.6 The Geolocation API must provide a way for the application to receive updates about errors that may have occurred while obtaining a location fix.

6.2.7 The Geolocation API must allow an application to specify a desired accuracy level of the location information.

6.2.8 The Geolocation API must be agnostic to the underlying sources of location information.