HTML5 – How Does Precise GeoLocation Work in HTML5?

firefoxgeolocationhtml5wireless-networking

This is quite a long winded question, you can just skip to the last sentence if you don't care about the background info.

I just tested out HTML5 geolocation using Firefox 3.5+, and it managed to find my house, literally my exact address. I've been reading about how it works but can't find any detailed information, it says it collects information about local access points and then forwards this information to Google.

I checked this out by testing it out on my wired PC, and it wasn't even close. So it definitely uses wireless. I checked out another service called Skyhook which works similarly, and their "How it works" page says they have a database with thousands of wireless points stored, so when you connect it simply looks up wireless points around you.

Sounds like a perfect secondary job for the Google Street View van, though everywhere I've read I can't figure out if Google uses the same technique.

I'm wondering how Google's geolocation works, whether they also store a huge database of wireless access points, or if there are other methods that can do this.

Best Answer

whether they also store a huge database of wireless AP points,

Well, that's one way of how it works, according to their blog:

Google Maps asks your web browser for your location. Typically, your browser uses information about the Wi-Fi access points around you to estimate your location. If no Wi-Fi access points are in range, or your computer doesn't have Wi-Fi, it may resort to using your computer's IP address to get an approximate location. As you'd expect, the accuracy of My Location varies with your location, and in some cases, Google Maps may not be able to provide a location at all.

W3C Geolocation API, however mentions

The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude. The API itself is agnostic of the underlying location information sources. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.

Related Question