W3C home > Mailing lists > Public > public-geolocation@w3.org > November 2011

navigator.geolocation.enabled

From: Ryan Alyea <ryan@fangamer.com>
Date: Wed, 2 Nov 2011 15:08:06 -0700
Message-Id: <D1D0EED6-C57F-4A01-9A24-3C1A4A2ACACD@fangamer.com>
To: public-geolocation@w3.org
There should be a navigator.geolocation.enabled or navigator.geolocation.trusted element if the browser trusts the page. Blindly using navigator.geolocation.getCurrentPosition in many browsers forces a popup box asking if the page should be trusted, which is poor UI.

I run an e-commerce store that would like to get their zip code for shipping calculations, and getting their position from their device is much more reliable than an IP-only based geolocation. I would like to see if the user trusts me to give their location and use navigator.geolocation.getCurrentPosition else fallback to another method, that way the user never sees the trust popup.

Ryan Alyea
ryan@fangamer.com
Received on Thursday, 3 November 2011 17:53:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:56 GMT