[whatwg] Geolocation in the browser

Kornel Lesinski wrote:
> For some applications location given in format other than lat/long may 
> be more useful and less privacy-sensitive.

The privacy-sensitivity problem can be easily dealt with by reducing the 
accuracy of the lat/long given.

> For example name of the city might be good enough if you order a cab 
> from a nationwide company.
> Postcode would be easiest way to integrate location API with existing 
> services (especially via userjs/greasemonkey, where using 
> location->postcode database may be difficult).

The problem with suggestions like this is that they require geocoding on 
the server side. Geocoding services are not always readily available; 
there's no free, unencumbered implementation I know of. And you need a 
different database for every country.

I guess I don't object to the browser returning this information 
additionally if it knows it - but lat/long should be the baseline, 
always-present info.

> My proposal is:
> 
> use navigator.getGeolocation instead of window.getLocation to avoid 
> conflicts with existing functions (window object is a global namespace 
> in JS) and to avoid confusion with window.location object.

I think this is a good idea.

> navigator.getGeolocation() would return location with best precision 
> allowed by default (without asking user every time). If user set in 
> preferences that every page can get location with 10km precision, that 
> would be returned.

I think it's better to ask every time and remember the precision 
allowed. I would certainly much prefer to know who knows where I am.

Gerv

Received on Friday, 23 February 2007 07:15:13 UTC