Google Maps Knows Where You Are

Adam DuVander
Jul. 13 2009, 12:56AM EDT

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.

Adam DuVander Hi! I'm Developer Communications Director for SendGrid and former Executive Editor of ProgrammableWeb. I currently serve as a Contributing Editor. If you have API news, or are interested in writing for ProgrammableWeb, please contact Though I'm a fan of anything API-related, my particular interest is in mapping. I've published a how-to book, Map Scripting 101, to get anyone started making maps on websites. In a not-so-distant past life I wrote for Wired and Webmonkey.




  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.