Frogspotter v3 and MelHack wrap-up

8 November 2009, 23:23

So first I will show off a bit more frogspotter and then talk about #melhack as an event.

After making version 1, I got some great advice from people at melhack and not, about how to do clustering of Google Map markers. It seems there are quite a few options. I ended up going with MarkerClusterer:

(Oh and check that species list. But more on that later :))

MarkerClusterer looks great… in fact, maybe it looks too good. I do prefer the colour explosion of seeing all the different coloured markers directly. With MarkerClusterer, the “cluster” markers have their own colour scheme which is just related to the total number of markers. I can’t figure out a way to preserve the different species-ness of the markers when they get turned into clusters.

But, OTOH, with MarkerClusterer I can actually display all 6,700 points on the map, with minimal complaint from Firefox. So… that’s a tradeoff.

So yeah, when I build the markers, I also insert checkboxes in the table on the right for each species, and buttons to add or remove all of them. The buttons work perfectly, but the per-species toggling is a little wonky. If you click “Remove all”, then check one species, then uncheck it again, they don’t disappear when you uncheck it. I have to rework the JavaScript relating to that.

The cluster markers also freak out if you do “Remove all”, check some species, then try and zoom in. They stay as cluster markers and don’t convert to individual markers like they are supposed to if you zoom in enough. But if you just zoom in on the initial map with everything, you can see the individual markers. :)

So the pop-ups now have a link – to pages at Frogs of Australia, like Neobatrachus centralis. I was so happy to do that because Frogs of Australia have an awesome pretty/clean URL scheme. No API or searching or anything needed!

A few things more I would like to do

  • Fix the marker handling so that the check boxes work properly – hopefully will fix zooming on cluster markers too. (you never know)
  • convert to using jQuery
  • Add an image from Flickr/Wikimedia Commons in the pop-ups
  • And probably cache them…
  • Drop in a templating system…hmm, maybe Mako?
  • Add an ‘about’ page
  • Incorporate timeline data, per-species, in a graphic to the right of the checkboxes – so far I’ve just completely ignored this
  • Overlay other data like national parks

That’s all rather ambitious given I’m not devoting any more consecutive 24-hour stretches to this project, but you never know. :) Maybe I’ll be inspired for the MashupAustralia deadline this Friday. Or maybe I’ll work on it this Saturday at the GGD Afternoon Hack, even though the deadline is past it will still be a fun project.

Even though I know how simple it is to put together something with Google Maps, there is still something magic about seeing your dots show up on a map. Even other techies I showed it to over the weekend had the same reaction.

This weekend is also basically the first time I had ever written any JavaScript myself. Mostly, of course, I didn’t: lots and lots of cut and paste, save, refresh, console.log, rinse and repeat. But I was surprised to find that I quite like writing JavaScript. Must be the dynamic typing. I quite also liked that “object = associative array” because I use dictionaries (Python name for an associative array) a lot in Python. But although I liked writing it, debugging it is still another matter. Of course I made heavy use of Firebug, but I really need to go through a basic tutorial or two so I have a better understanding of the lay of the JavaScript universe. Overall that was a happy discovery.

I found out on Twitter when I got home that someone else had been inspired to work with the frog data too, at the Sydney oahack (OpenAustralia) hackfest. So I am very curious to see that. :)

During my presentation of frogspotter at the end of MelHack, I was corrected by Dr Gruen about where the data came from — I had wrongly assumed it was recorded by South Australian public servants. But no! It’s from the public. Pretty awesome.

To MelHack itself, it was such a great event. Lonely Planet provided a great building, great staff and support for everyone who came. Host Matthew Cashmore in particular did a really great job. We were fed well, had laser skirmish, won amazing prizes (set of every LP guidebook, Asus eee PCs, 24’‘ monitor etc…) and got to sleep under the stars on the top of a three storey building in Footscray. The staff were really friendly and happy to help out with anything. Even debugging JavaScript.

You might call it a geek adventure. ;)

tags: , , ,

---

Comment

Subscribe to comments on this post: rss / atom

Commenting is closed for this article.