the whereami firefox extension

  • Christian Stocker

Long time ago I started with my first real firefox extension. I called it “whereami”, 'cause the basic idea is, that it shows where you are. It currently only works together with plazes, but a proof-of-concept for a GPS based “lookup” is already done.

But just telling you, where you are, is of course not really interesting in itself, but integrating that with other services could be. Therefore I integrated this with local.ch (and you guessed it, that's the reason why I started the extension in the first place). When you now have installed the extension, configured it with your plazes username/password, have your plazer running (or later a GPS hooked up) and you go then www.local.ch, you'll be redirected to the town you're sitting and the map zooms to your location. Additionally, it shows where all your plazes-friends are (you have to zoom out, if they are not nearby).

Technically, the extension uses the Plazes API via gecko's built-in XML-RPC library to get all the needed data. It also caches some data, so that it doesn't have to make a request to plazes each and every time. But as it's my first real firefox extension, it certainly still has some rough edges which could be done better technically.

The extension is also extensible, it currently not only works on local.ch, but also on flickr. If you want to upload a picture at flickr.com/photos/upload, it automatically adds the necessary geolocation tags so that your picture is automatically placed on the right place on their map (or not, if the pics are taken on a different place than you do the upload :) ). More services would be certainly possible, so if you have any ideas, just tell me (or get the code at http://svn.liip.ch/repos/public/misc/whereami/ and hack it by yourself, adding new services should be quite straight forward)

The “compiled” and installable extension can be downloaded here: files.chregu.tv/whereami/whereami.xpi

There are of course many more ideas, what could be done with such an extensions, some can be found in the TODO file. But if you have more ideas, just tell us.

Btw, this extension was already announced on the local.ch blog two days ago, with some more info and a better how to us it explanation.

Update: Thanks to Gregor, it now also works on http://maps.google.com/. if you have the extension (at least version 0.2.1) installed and go to Google Maps, it automatically fills the near field on “Find Business” or “Get Directions” with your current Plazes coordinates. Cool.

Update II: To make things “equal”, it now also work with Yahoo Maps, it should automatically center to your location. I also introduced a new API to make it easier to use for other sites, but more about that later. In the meantime. you can look at the gmaps.js as an example.


Tell us what you think