[PLUG] Geolocation in HTML
Michael
michael at jamhome.us
Mon Jan 10 18:20:04 UTC 2011
Michael Rasmussen wrote:
> I'm reading Dive into HTML5
http://diveintohtml5.org/
>
> There's a chapter on HTML5
features including Geolocation.
> Clicking through the test link
Firefox pops up a warning "website wants
> Geolocation. Tell
them?" kinda thing.
>
> I click yes and a Google map
showing my exact location pops up.
> Repeat with Chrome, same results
including getting my permission first.
> Konqueror doesn't support the
feature.
>
> This raises two questions:
> How? I'm
doing my web browing through my laptop -> home WiFi -> DSL linkage.
> Why do large commercial sites (eg, Facebook) keep making me offers for
Seattle
> based services?
>From work I'm comforted (?) by
the Geolocation test coming up several miles off.
Oh, wait, they ID the
corporate office downtown.
Google time shows:
http://hacks.mozilla.org/2009/06/geolocation/
Under the Hood
There are a few common ways to get location information. The most common
are local WiFi networks, IP address information, and attached GPS devices. In
Firefox 3.5 we use local WiFi networks and IP address information to try and
guess your location.
There are a few companies that drive cars around listening for WiFi access
points spots and recording the access point’s signal strength at a
specific point on the planet. They then throw all of this collected data into
a big database. Then they have algorithms that allow you to ask the question
“If I see these access points, where am I?”. This is Firefox
3.5′s primary way of figuring out your location.
But not everyone has a WiFi card. And not every place has been scanned for
WiFi. In that case Firefox will use your local IP address to try to figure
out your location using a reverse database lookup that roughly maps your IP
address to a location. IP derived locations often have much lower accuracy
than a WiFi derived location. As an example, here in Toronto, a location from
WiFi is accurate to within 150 meters. The same location using just an IP
address is about 25 km.
END of QUOTE
I can confirm/deny that explanation by checking to see
if FF does a query out to that database.
Typically there are a half
dozen WiFi nets visible from home. Combine them with two hops of
traceroute to determine my global IP (nat) and the software has a lots of
clues to work from.
Side project for PTP what WiFi nets are visible
from each www.personaltelco.com hotspots?
--
Michael Rasmussen
http://www.jamhome.us/
Be Appropriate
&& Follow Your Curiosity
More information about the PLUG
mailing list