Tuesday, February 10th, 2009
Jon Combe has implemented a world map using Canvas to draw it all, for his JAWStats website statistics package.
You can tweak the color combinations and highlight areas, but no clicking and moving around just yet. Here are some of Jon’s thoughts:
The smallest places aren’t included on the map, so if you live in Lichtenstein, please accept my apologies.
Now for the car crash hack: Lesotho is unique in that it is wholly within another country, South Africa (actually, Vatican City is too, but it was too small to make it onto my map, apologies to the Pope). This means that if you draw South Africa after you’ve drawn Lesotho, Lesotho disappears. My horrible shortcut is to draw Lesotho again, immediately after drawing South Africa. Sad, lazy and ugly. But true.
If you’re interested where I got my data from I downloaded a big file from Wikimedia Commons which I opened in Adobe Illustrator where I plotted the country outlines. I then exported this as an SVG file and using a little jQuery looping jiggerypokery I extracted the coordinates.
Posted by Dion Almaer at 6:38 am