Making the maps more efficient

The maps seem to be running much more smoothly now I have tidied up the JavaScript quite a lot and tried to make it more efficient, it seems to run much better now (with around 400 users) than it was previously, when it could fell very sluggish. With only 10s of users it is far quicker than before. Using the firebug plugin to narrow down the bottlenecks really helped. I’ve also added the number of user who are on/off line for each group – as you get with the normal MSG client.

Have now run into another problem with the clustering though. We noticed that sometimes you could get (on a wide view) two different markers displayed, then when you zoom in one level these combine into one, zoom in yet further and they go back to being 2 different points. The reason (I think) is to do with the size of the grids not being exact multiples of each other, so on a wide view the 2 points could be in different grids (hence the 2 markers), then on the next zoom in they’re actually in the same grid square – hence just the one marker. This looks a bit odd as you would imagine the the makers to only divide out as you zoom in (only combining when you zoom out). So the solution will be to have the grids for each zoom levels exact multiples of each other. So I’m looking into this now ;-)

Leave a Reply