mail usprint this pagerss feed

Liip is hiring!

the whereami firefox extension

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 http://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: http://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.

Related Entries:
whereami extension: now privacy enabled
Firefox 3.0.4 and even more issues with the encoding in XMLHttpRequest
GottaGo in "Blick am Abend"
Encoding issue with XMLHttpRequest and Firefox 3
Okapi 1.0 released
Comments (6) |  Permalink

Comments

Gregor J. Rothfuss @ 20.05.2007 21:08 CET
neat!

this really needs to be done via a standard call, eventually:

http://weblogs.mozillazine.org/dougt/archives/016719.html
Gregor J. Rothfuss @ 20.05.2007 21:15 CET
oh, and just to be clear: your per-site approach is a good one. we won't have said standard until there is enough demand for it, and your extension helps create it.

now to write some glue code for google maps.. :)
chregu @ 20.05.2007 21:23 CET
Yep, a standard way of accessing this info would be neat (and a privacy nightmare for a lot of people :) )

My little extension does it (currently) not the way your link does it. It basically just writes the coordinates into the webpage into a hidden div, which another script (greasemonkeylike, in the document scope) can read again. Very ugly and hacky, but it obviously does the job and I couldn't figure out the firefox/extension security mechanism do to it more nicely in the short time had. Maybe another day, incl. privacy mechanism :)
Frank Hamm @ 30.05.2007 16:13 CET
Plazes relaunched yesterday and AFAIK also changed the API. Does the your FF extension still work?
chregu @ 30.05.2007 17:33 CET
Frank: Yep, still works with the new API
selülit tedavisi @ 27.05.2009 07:20 CET
Sounds a bit frightening to me - but there that's technology for you. If a government had suggested this there would be an outcry from the freedom groups.Its very strange how they keep inventing things for which I have managed without for years. But then I thought that about the telephone! Oh well, I'm just an old mum!

add a comment

Your email adress will never be published.
Comment spam will be deleted!

For Spammers Only
Name*
E-Mail
URL
Comment*
Notify me via E-Mail when new comments are made to this entry
Remember me (needs cookies)