How, exactly does HTML5's GeoLocation work?
Asked Answered
T

2

81

I know the browser shares my IP address and details of nearby wireless networks to determine my location, but what sort of info does it know about nearby wifi networks?

For example, where I live are no public wireless networks, and from my home I can see about 5 private networks, yet my location is determined within 20 meters. With there being no open networks nearby, how does Google determine my location? The only way I can think of is that Google mapped the locations of all wireless networks when they mapped streets for Street View.

I've searched about online, but all I can't find any specific details.

Telethermometer answered 14/6, 2010 at 21:34 Comment(1)
It's not HTML5 per-se. See https://mcmap.net/q/260616/-about-geolocation-in-html-5/…Munificent
C
70

The data sent by Firefox to Google is for all visible access points, public or private. For each access point detected, it sends the following data to https://www.google.com/loc/json:

  "mac_address": "01-23-45-67-89-ab",
  "signal_strength": 8,
  "age": 0,
  "SSID": "MyAccessPoint"

where

  • mac_address is the mac address of the WiFi node.
  • signal_strength is current signal strength measured in dBm.
  • age is the number of milliseconds since the WiFi node was detected.
  • SSID is the name or ESSID of the WiFi node.

The georeferenced WiFi data used to geocode your request was collected when Google was driving around taking pictures for StreetView.

It is important to note that, however, that this is how the HTML5 geolocation API is implmeneted on Firefox using Google's Geolocation Services. This is an implementation, not a specification. If your device has a built-in GPS, it is probably desirable that your HTML5 implementation queries the GPS directly, rather than using a geolocation service.

Even firefox implements this feature differently on Windows and Linux. Using a current Firefox on Windows, details of all visible WiFi nodes are sent to Google. Using a current Firefox on Linux, only details of the currently connected WiFi node is sent, due to the reliance on libiw for access point data.

As another answerer noted, Safari uses Skyhook Wireless's service which does much the same thing as Google's Location Services.

Clavier answered 14/6, 2010 at 23:28 Comment(0)
E
6

Data is gathered by Skyhook Wireless (Wikipedia), and they make no distinction between public and private wifi points - they log the locations of all of them. I wouldn't be surprised if the Google Street View vans also logged location data for access points.

Eats answered 14/6, 2010 at 21:50 Comment(1)
The Google street cars do log wifi data - they are currently being investigated in several european and apac countries for the practice because it potentially breaks privacy laws.Candiscandle

© 2022 - 2024 — McMap. All rights reserved.