5x12 pentomino tiling
«

Location Based Services

»

I've been playing around with the Google Gears Geolocation API with the intention of using it for a couple of projects I'm working on at the moment. In essence what the API offers web applications is some hint as to where the user is physically located.

It currently works on the latest versions of a lot of browsers including Firefox, Opera, and Chrome and I'm assuming it'll work with Internet Explorer although I've not tried it yet. On mobile phones it works on the standard browsers on the iPhone and Android phones as well as the latest Opera Mobile.

On all these platforms it's a permissive system, so the first time the application asks for your position you are asked if you want to let the application know where you are. How it works depends on what data it's got to hand. The documentation suggests it's based on a combination of the following, in order of accuracy:

  1. IP address
  2. Location of the cell you're tuned to (if you're using a mobile)
  3. MAC address of any wireless access point (WAP) within range (possibly ones which Google have previously mapped during their Google Streetmap project - I'm not clear about this)
  4. GPS data

So how well does it work? Well as an experiment I added another option to our mapping application at maps.the-hug.net last night. If you go to "here" it now re-centres the map on where it thinks you are. I tried different devices here and I also asked people who follow me on Twitter to try it out. Here's the results to date:

  • Using our VirginMedia cable connection and a wired PC it claims I'm by the police station in Cambridge, so that's an error of about 3.2 miles. Ellie got the same result from elsewhere in Milton.
  • Using my laptop and WiFi to hook into the same VirginMedia connection it gets our location pretty much spot in (which suggests our WAP is in their database).
  • Rob reported that using Firefox under Mac OS X and connected via WiFi to VirginMedia it did the permissive thing but then didn't re-centre the map at all1.
  • Rob also reported that on his iPhone (iOS 4 on WiFi) it centred correctly on his home in Milton. He got the same result connecting via 3G (so this time it was clearly using his GPS).
  • Paul, who was in Lambeth, reports that it "looks about right to me" on a Google Nexus One.
  • Derek, having failed with Opera Mini (reports "not supported") and the Blackberry browser (which can't see my newly added "go" button) tried with his desktop PC ... and was told he was in Gloucester! He's connected via Nildram ADSL which is the same people who supply our backup ADSL line but when I tried it here I got the same result as with VirginMedia.
  • Mary-Ann, also in Milton, is told she's up the road in Waterbeach. She was using her iPhone connected via WiFi to her VirginMedia connection (when she uses a wired connection she gets the same result as everyone else). She also tells that they didn't have WiFi when the Google car came around so my suspicion is that on the iPhone it used the cell she was connected to as her GPS wasn't on.
  • Jez in New Zealand got a very odd result (see below). We're looking into that. If anyone else outside the UK wants to have a play you might like to try maps.the-hug.net/geo.php - that should tell you your latitude and longitude and you can then see where that is on a Google Map.

So results thus far suggest that if you're using a mobile with GPS turned on or you're using WiFi and it know about the WAP you're connected to it's impressive. Otherwise not so.

Anyway this is a work in progress: if you want to try it where you are then type "here" in the "Go To" box top left and click "go". It will ask you if you want to allow map.the-hug.net to know where you are. Say that you do. Then watch the centre of the map. It should re-centre and a cross should appear there for a while before fading out.

If you want to help I would like to know:

  1. how close the cross is to where you are (if you click on the point where the cross appeared, then find where you are on the map and click there a blue line will appear and its length will be shown in the "Your Route" box on the left).
  2. what browser (e.g. Internet Explorer, Firefox etc) you used on what platform (e.g, Linux, Windows, Android).
  3. if you used a mobile phone which one you used.
  4. how you were connected to the Net - if you did this at home did you use WiFi or did you use a wired connection. And who is your ISP?

You can comment here or and I'll update this list.

  1. I've seen this too - it looks to me like the AJAX request just dies silently sometimes.

Tags: maps, web design Written 15/09/10


Previous comments about this article:

On 16/09/10 at 6:41am Jez wrote:

Despite being a tad out of range of the UK, I am apparently in Darlaston, West Midlands. Of all the god-forsaken a*** ends of the world, you put me there. Now, the *really* freaky bit is that I used to work there, you remember Radius don't you? Either there's a rift in space time taking me back about 16 years, or you're a smartypants and *knew* I'd try it and coded accordingly. Nice one!

On 16/09/10 at 12:45pm Paul wrote:

Not me guv. You have mail.

On 05/12/10 at 9:45am Graham Denison wrote:

Here I am, sat up in bed at the Whitley Hall Hotel, in Grenoside (why did I read it as 'Genocide'?), north of Sheffield, on the hotel's FREE WiFi (why can't the big hotels offer it?), just having finished breakfast in bed I thinks to myself, I wonder where the Tall of Paul's mapping reckons I am?

Key in 'here', puts me in Whitley, zoom in and the marker is within 100 metres of the hotel... I don't know whether to be impressed or worried!

Comment on this article

«
You can follow these posts on Twitter at @Wibblings
»
I am currently reading:

Scotland: The Autobiography by Rosemary Goring Bring on the Empty Horses by David Niven

(?)
Word of the Day:
regnancy