You Are Here!


Posted By: Thomas Shaw, 1:58pm Monday 28 June 2010

Soon, all browsers will support the HTML5 Geolocation API by default. Geolocation is the core function behind sites like Foursquare which can work out where you are located. I have previously talked about using Geolocation services used for sourcing or stalking candidates, but it does have some other uses in online recruitment.

Working out users location is not new or revolutionary. We have all been doing this for years via IP address lookup services (although these are never 100% accurate). But now, we can get the user to opt-in and provide more accurate information.

For example, when you visit a location-aware website your browser will ask you if you want to share your location.

If you agree, the browser gathers information about nearby wireless access points and your computer’s IP address.

Then it sends this information to the default geolocation service provider (Google Location Services) to get an estimate of your location.

That location estimate is then shared with the requesting website script.

So how can we use this in online recruitment? We can use the user’s geolocation data to confirm the users credentials while





Applying for a role. If the user is not located within a certain area, you could notify them that you only accept applications from users in the following locations. (I don't suggested this. See previous article on Rejecting Candidates based on IP Address)



Contact details. Work out which is the closest office to the user and serve up that information.

Security checks. Collect the users geolocation data when they register, login, buy job credits etc.

I have modified a simple HTML5 Geolocation API script first written by Michael Spector with some extra browser checks. Try it on your desktop browser and mobile phone to see the difference.
<html> <head> <script type="text/javascript"> if (navigator.geolocation) { alert("Your browser supports HTML5 Geolocation API"); navigator.geolocation.getCurrentPosition(function(position) { document.location.href = "http://maps.google.com/maps?q=" + position.coords.latitude + ",+" + position.coords.longitude + "+(You%20are%20here!)&iwloc=A&hl=en"; }); } else { alert("Your browser does not support the HTML5 Geolocation API"); } </script> </head> <body> <h1>HTML5 Geolocation API</h1> </body> </html>