“This is the year of location”
All the pundits & usual techhype suspects have moved on from the Greek Chorus-like droning of “This is the year of mobile,” to the new barely comprehensible marketing meme of location-based mobile … well, mobile whatever. Swing a search engine by the tail and you’ll quickly run across a plethora of articles claiming that the Next Big Thing is geo-aware search. Or geo-aware social media. Or GPS-enabled hyperlocal BT-enhanced in-app advertising. Or geo-aware NFC-fueled m-commerce with an iTunes preference-recommendations twist that also locates all the socks that somehow went missing in the dryer.
(*deep breath*)
OK. One thing at a time. The business opportunity for developers looking to launch their own pet projects and start generating positive revenue looks a lot more do-able when the potential to start snarfing up ad revenues (even if they are rather slim for at least the next couple years) is added to the mix. Apple’s increasing move to start leveraging the m-commerce possibilities of its iTunes store (currently 500 million strong) are, or should be, a real wake-up call to retailers.
The task for designers is figuring out how to incorporate the Geolocation API into their new HTML5 designs (hey – you got this far into a post before you saw the words HTML5 – must be some kinda record). Here’s a nifty little Javascript to play around with:
<script language=”Javascript”>
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
ZoomToLocation(position.coords.latitude, position.coords.longitude);});
}
else {
if (document.getElementById(“GeoAPI”)) {
document.getElementById(“GeoAPI”).innerHTML
= “I’m sorry but Geolocation services are not supported by your browser.″;document.getElementById(“GeoAPI”).style.color = “#FF0000″;
}
}
function ZoomToLocation (mylat, mylong) {
if (document.getElementById(“GeoAPI”)) {
document.getElementById(“GeoAPI”).innerHTML = “mylat: ” + mylat + “ mylong: ” + mylong;
}
}
</script>
If you want to see a live example of how the GeoLocation API tag works on an HTML5 page, check out this demo.
Here it is on an iPhone (quite accurate):

And here it is on a Firefox browser (only very generally accurate – dunno if this is because it’s homing in on my server, or if the designer made it less accurate so it wouldn’t be so creepy):
