Google Maps Knows Where You Are

The world's most popular map service can now tell you where you are. Google Maps has now added a feature that uses JavaScript to geolocate your current whereabouts.

If you have Firefox 3.5 or the latest version of Chrome, you can see this in action. From the main maps page, click the circle below the pan interface. If you have a supported browser or plugin, you'll be asked to share your location with Google Maps. Approve the request and the map automatically zooms to the most accurate location it can find. Then a small blue dot indicates your current whereabouts on the map.

Google Maps Geolocation Example

The technology behind browser geolocation is a massive database of WiFi hotspots. Because the unique IDs of these devices are broadcast, even when the access to them is secure, they can be tied to latitude/longitude coordinates. The result is precision within a block in many urban areas.

This is not yet supported in all browsers. As noted above, this supported in the latest versions of Firefox and Chrome, and slightly older versions of Firefox could do the same with either the Geode or Loki add-ons. Google Gears makes geolocation possible in even more browsers, including mobile devices.

In order to include a similar feature in your website, see the W3C draft standard. Since it's a work in progress, the interface may change, as it has already. Unfortunately, that means there are slightly different methods to access the data with Firefox 3.5, Geode, Loki and Gears.

Nevertheless, this is the sort of feature that will greatly help many map-based sites, side-stepping the sometimes cumbersome "enter your address" forms.

Be sure to read the next Mapping article: FortiusOne Releases Open Source Geocoder. Is Geocoding Becoming a Commodity?