How does Google My Location work?

It's mostly up to the browser to implement. One example, which is used on the iPhone & iPod touch to help determine location, is SkyHook Wireless.

From the Maps help page:

The feature is available in browsers that support the new Geolocation feature. This feature may be built in to the browser itself, or can be provided by the Gears browser extension. Currently supported browsers include Google Chrome 2.0+ (using Gears), Mozilla FireFox 3.5+ or any browser with the latest version of Gears installed.

The geolocation feature, if built in to the browser, is accessed via Javascript with navigator.geolocation:

navigator.geolocation.getCurrentPosition(function(pos) {
    // Do something with position
});

More usage info is at the Mozilla Developer Center.


Google's MyLocation first debuted on cell phones and other mobile devices. In that case it would use 3 sources of information to determine location.

  1. GPS - Many phones have GPS built in, but may not want to use it for battery reasons or because it takes too long to get a lock.
  2. Cellular - Google Maps can use nearby cellular towers to triangulate an approximate position. This is more accurate in urban areas due to the higher density of towers.
  3. WiFi - Finally it can use WiFi in the same way that cellular towers are used, as well as with IP information. Based on nearby WiFi networks and by doing a trace on the IP address through the ISP this can sometimes be as accurate as Cellular, but normally just ends up being city level accuracy, or worse in some rural areas.

Most phones end up using Cellular, since it is fastest and doesn't add to the battery drain.

Most computers use WiFi/IP information, since no other options are available