FireEagle and geo-location fun

March 12th, 2009. Tagged: JavaScript, yahoo

fireeagle logo

FireEagle is a newer service from Yahoo, it's an API and service that stores your geo-location and lets other application read or update it. With your permission, of course.

Now there's a FireEagle Firefox extension, still marked experimental in Add-ons.Mozilla.org so you need a free AMO account in order to download it.

Once you install it, it will lead you through installing a prerequisite - the Geode extension from Mozilla Labs which checks the WiFi networks that are available to you and figures out where you are. The FireEagle extension then uses Geode to get the location and update its database. Of course you have full control over how precisely you want to share your location (exact, zip, neighborhood, city, state, country).

So what then? Well, then there's the FireEagle api and a bunch of applications using it to do all kinds of stuff, like update you Facebook profile and so on. Also the extension is just one way to figure out your location, there are also other ways like iPhone apps.

Geo-location via JavaScript

What I found fascinating is that once you have Geode, pages can request your location via JavaScript. This is actually a w3c standard.

A simple example of logging the position object - just type into Firebug's console:

navigator.geolocation.getCurrentPosition(console.log)

A warning appears that the page has requested you location and you can say No! or you can allow a degree of access - exact, neighborhood or city.

geo warning

Once you allow access, an async process kicks in and your callback (in this case console.log) gets notified when the location information is available. The callback receives a "position" object which has properties such as latitude, longitude, velocity, accuracy...

Pretty neat stuff.

Tell your friends about this post on Facebook and Twitter

Sorry, comments disabled and hidden due to excessive spam.

Meanwhile, hit me up on twitter @stoyanstefanov