views:

1484

answers:

9

Right this is confusing me quite a bit, i'm not sure if any of you have noticed or used the "my location" feature on google maps using your desktop (or none GPS/none mobile device). If you have a browser with google gears (easiest to use is Google Chrome) then you will have a blue circle above the zoom function in Google Maps, when clicked (without being logged into my Google Account) using standard Wi Fi to my own personal router and a normal internet connection to my ISP, it somehow manages to pinpoint my exact location with a 100% accuracy (at this moment in time).

How does it do it? they breifly mention it here but it doesn't quite explain it, it says that my browser knows where i am...

...i am baffled, how?

I am intrigued because I would love to integrate it in the future of my programming projects, just like some background understanding and it doesn't seem too well documented at the moment.

A: 

I know you can look up IP address to get approximate location, but it's not always accurate. Perhaps they're using that?

update:

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.

pxb
That's too easy, and not accurate enough. You can map it to the nearest exchange at the maximum, not to my exact point.
Shadi Almosri
yeah, sometimes it's not accurate at all. We show as in Glasgow even though we're hundreds of miles away in London.
pxb
Regarding the update - How does it know what WiFi access points are around me? :P
Shadi Almosri
The quote is from the link you provided. I'm assuming the browser (and it has to be a supported browser, so there's definitely client specific code for this to work), can get info from the OS on the Wifi access points your PC can see (even if it's not connected to them), and use a server to look up info on them to determine their locations. Then you can maybe triangulate to calculate the computer's location?
pxb
+2  A: 

They use a combination of IP geolocation, as well as comparing the results of a scan for nearby wireless networks with a database on their side (which is built by collecting GPS coordinates alongside wifi scan data when Android phone users use their GPS)

bdonlan
Ok lets assume they got my ip geolocation to London, i don't really understand the next part? How are they scanning what wireless is near me, how do they know where "near me" is? My WiFi router is mine and doesn't allow access to anyone else, so they can't know about it or use it.
Shadi Almosri
see my comment below: they run client code (in Chrome etc), so google don't access your router, but the client browser can access your wireless card and determine what wireless networks are nearby.
pxb
+5  A: 

I am currently in Tokyo, and I used to be in Switzerland. Yet, my location until some days ago was not pinpinted exactly, except in the broad Tokyo area. Today I tried, and I appear to be in Switzerland. How?

Well the secret is that I am now connected through wireless, and my wireless router has been identified (thanks to association to other wifis around me at that time) in a very accurate area in Switzerland. Now, my wifi moved to Tokyo, but the queried system still thinks the wifi router is in Switzerland, because either it has no information about the additional wifis surrounding me right now, or it cannot sort out the conflicting info (namely, the specific info about my wifi router against my ip geolocation, which pinpoints me in the far east).

So, to answer your question, google, or someone for him, did "wardriving" around, mapping the wifi presence. Every time a query is performed to the system (probably in compliance with the W3C draft for the geolocation API) your computer sends the wifi identifiers it sees, and the system does two things:

  1. queries its database if geolocation exists for some of the wifis you passed, and returns the "wardrived" position if found, eventually with triangulation if intensities are present. The more wifi networks around, the higher is the accuracy of the positioning.
  2. adds additional networks you see that are currently not in the database to their database, so they can be reused later.

As you see, the system builds up by itself. The only thing you need is good seeding. After that, it extends in "50 meters chunks" (the range of a newly found wifi connection).

Of course, if you really want the system go banana, you can start exchanging wifi routers around the globe with fellow revolutionaries of the no-global-positioning movement.

Stefano Borini
You posted the edit to your post as i was writing my answer :)
Shadi Almosri
A: 

I've finally worked it out. The biggest issue is how they managed to work out what Wireless networks were around me and how do they know where these networks are.

It "seems" to be something similar to this:

  1. skyhookwireless.com [or similar] Company has mapped the location of many wireless access points, i assume by similar means that google streetview went around and picked up all the photos.
  2. Using Google gears and my browser, we can report which wireless networks i see and have around me
  3. Compare these wireless points to their geolocation and triangulate my position.

Reference: Slashdot

Shadi Almosri
A: 

It is possible get your approximate locate based on your IP address (wireless or fixed).

See for example hostip.info or maxmind which basically provide a mapping from IP address to geographical coordinates. The probably use many kinds of heuristics and datasources. This kind of system has probably enough accuracy to put you in right major city, in most cases.

Google probably uses somewhat similar approach in addition to WiFi tricks.

Juha Syrjälä
IP location has been known for a while, and it's quite easy to work out to city level, it's the precision of location that this question was interested in...
Shadi Almosri
A: 

They're not using WiFi networks around you. I pulled my location this morning while connected to my home wireless network and it mapped my location /precisely/ - and after I connected to skyrim wifi (local WISP) it could only pinpoint what general area I was in.

My home wireless network is sitting on a wireless modem from skyrim too... but not their wifi network. skywave or something like that..

So somehow they know the location of my Linksys router (hidden reporter in the router firmware?)...

ct07
It's quite simple really, if their cars have driven past your house and detected your wireless network and GPS mapped it, it will be in the database. http://en.wikipedia.org/wiki/Skyhook_Wireless these are the guys that have the largest database which i am assuming google is using.
Shadi Almosri
A: 

Not to mention that no browser would just open up your WiFi connection and scan for networks around you without your permission. That's a major security vulnerability.

As far as your computer's location is concerned, there is no way they'll know where it is unless it is sitting next to your router/modem, I don't believe they're able to get past that especially if you're running a secure wireless network.

ct07
A: 

Rejecting the WiFi networks idea!

Sorry folks... I don't see it. Using WiFi networks around you seems to be a highly inaccurate and ineffective method of collecting data. WiFi networks these days simply don't stay long in one place.

Think about it, the WiFi networks change every day. Not to mention MiFi and Adhoc networks which are "designed" to be mobile and travel with the users. Equipment breaks, network settings change, people move... Relying on "WiFi Networks" in your area seems highly inaccurate and in the end may not even offer a significant improvement in granularity over IP lookup.

I think the idea that iPhone users are "scanning and sending" the WiFi survey data back to google, and the wardriving, perhaps in conjunction with the Google Maps "Street View" mapping might seem like a very possible method of collecting this data however, in practicality, it does not work as a business model.

Oh and btw, I forgot to mention in my prior post... when I originally pulled my location the time I was pinpointed "precisely" on the map I was connecting to a router from my desktop over an ethernet connection. I don't have a WiFi card on my desktop.

So if that "nearby WiFi networks" theory was true... then I shouldn't have been able to pinpoint my location with such precision.

I'll call my ISP, SKyrim, and ask them as to whether they share their network topology to enable geolocation on their networks.

ct07
http://coderrr.wordpress.com/2008/09/10/get-the-physical-location-of-wireless-router-from-its-mac-address-bssid/ you were connected by ethernet, but was it to a wireless router?
Shadi Almosri
A: 

Shadi,

Yes, it was a wireless router connecting to Skyrim Wifi.

I must correct myself however... After my post I called Skyrim tech support and they said that they do not share their network topology with 3rd party... I'd imagine they wouldn't... so I dug in a little deeper and did some experimentation.

In conclusion, it seems that I was mistaken. The geolocation worked precisely when my wifi on the desktop was enabled (via installed USB dongle), but did not work if I was connecting through a wireless router.

So... it seems that in order for geolocation to be effective, your wifi client has to be enabled and looks like geolocation software will read your "wireless networks in your area" list (I don't believe it will enable your wifi and perform a scan, it will access your wireless networks list only if your wifi is enabled, supposedly) and then compare it with a database such as Skyhook's.

The seeding mechanism theoretically does make sense too... still I disagree on its efficiency because wireless access points change all the time, but if they have enough wardrivers/iphone users continuously coming through the area and performing wireless site surveys with their phones then it should improve accuracy... but not reliability of the data.

Well, at least we sort of know how this works :)

ct07
That's the thing we know it works, so they're doing something right. Also with the naming of wireless networks, the probability of 2,3,4 wireless networks of the same name being next to each other is unlikely. thus you can quite reliably deduct the persons location. i think the answer we've come up with in this thread is pretty much accurate in answering the question :)
Shadi Almosri