<div>Thinking aloud here....</div>
<div> </div>
<div>What if the navigator object offered multiple geolocation-related values, and the user could select which one to provide either globally or on a per-site basis?</div>
<div> </div>
<div>For example:</div>
<div>.latLong = latitude and longitude within the mininum available error radius</div>
<div>.latLongApprox = latitude and longitude within a user-defined error radius</div>
<div>.postalCode = the current postal code</div>
<div>.municipality = the current town/city (useful?  compare Cairo, Egypt and Cairo, Georgia, US)</div>
<div>.state = state/canton/etc.</div>
<div>.country = country<br> </div>
<div>If postalCode, municipality or state is provided, country is always also provided to enable the server to look up the corresponding geographic area.<br> </div>
<div> </div>
<div><span class="gmail_quote">On 2/23/07, <b class="gmail_sendername">Gervase Markham</b> <<a href="mailto:gerv@mozilla.org">gerv@mozilla.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Kornel Lesinski wrote:<br>> For some applications location given in format other than lat/long may<br>> be more useful and less privacy-sensitive.
<br><br>The privacy-sensitivity problem can be easily dealt with by reducing the<br>accuracy of the lat/long given.<br><br>> For example name of the city might be good enough if you order a cab<br>> from a nationwide company.
<br>> Postcode would be easiest way to integrate location API with existing<br>> services (especially via userjs/greasemonkey, where using<br>> location->postcode database may be difficult).<br><br>The problem with suggestions like this is that they require geocoding on
<br>the server side. Geocoding services are not always readily available;<br>there's no free, unencumbered implementation I know of. And you need a<br>different database for every country.<br><br>I guess I don't object to the browser returning this information
<br>additionally if it knows it - but lat/long should be the baseline,<br>always-present info.<br><br>> My proposal is:<br>><br>> use navigator.getGeolocation instead of window.getLocation to avoid<br>> conflicts with existing functions (window object is a global namespace
<br>> in JS) and to avoid confusion with window.location object.<br><br>I think this is a good idea.<br><br>> navigator.getGeolocation() would return location with best precision<br>> allowed by default (without asking user every time). If user set in
<br>> preferences that every page can get location with 10km precision, that<br>> would be returned.<br><br>I think it's better to ask every time and remember the precision<br>allowed. I would certainly much prefer to know who knows where I am.
<br><br>Gerv<br><br></blockquote></div><br>