Ch-ch-ch-ch-changes (to geolocation API specifcations)

Dear web travellers,

Here at Mozilla, we’re constantly looking for more ways to make the web more powerful, innovative, and awesome. Lately, we’ve been talking about making some changes to the W3C Geolocation API specification to add some capabilities to make the use of the API more efficient, and to also help make it more descriptive for developers working with the API worldwide.

These changes come in the form of modifications to the way we deal with getting locations and finding their addresses. The way that this was carried out in the previous version of the Geolocation API was to query a location, and have the system return a location which had a geographical coordinate-based position, coupled along with an available address (if requested) of the general form:

interface Address {
    readonly attribute DOMString? country;
    readonly attribute DOMString? region;
    readonly attribute DOMString? county;
    readonly attribute DOMString? city;
    readonly attribute DOMString? street;
    readonly attribute DOMString? streetNumber;
    readonly attribute DOMString? premises;
    readonly attribute DOMString? postalCode;
};

However, this presented some issues with its design. First off, requesting an address has a significant cost associated with it, and currently there is no way to avert this high cost when retrieving an address. Secondly, while this form of data structure for mailing addresses does work well and make enough sense for developers in the western hemisphere, it doesn’t really fit a lot of mail addressing formats across the world right now.

To address these issues, our changes involve a new set of separate functions for getting detailed information regarding a physical location and a new data structure for mailing addresses that allows full use of platform APIs and allows a broader scope of addressing formats. This means that we will separate location queries so that instead of retrieving both the coordinate based position and an available address together, we will now be retrieving them individually. This will involve establishing another function specification to address the retrieval of a physical mailing address from a provided coordinate position. By doing this, we hope to allow developers across the globe to be able to utilize web based geolocation how and when they need it. This will allow developers to specify the accuracy of their query requests, which will hopefully allow developers to reduce the amount of cost associated with their address retrieval queries. We also hope to remodel the data structure for physical mailing addresses, allowing developers across the world to be able to make more sense of how to get the data that they want in or out of an address.

More information and full details about the new function specifications and mailing address data structure are available here.

Sincerely,

- Josh

Updated: some modifications have been made to the list of changes to the geolocation API specification, removing the enableHighAccuracy flag from the AddressOptions object due to inconsistencies between the current capabilities of platform APIs and the flag’s intended benefits.

About these ads
Tagged , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: