The code I used to animate the geographic map of Europe to a square tile map in The Eurosearch Song Contest. It uses the great geo2rect by Sebastian Meier.
This map is basically a clone of one of Sebastian's examples. I created the geojson from Natural Earth data, selected the countries I needed (the Eurovision participants) in QGIS and simplified the geometries with mapshaper. Laying out the tile grid was a nice puzzle (yes, looking at you, Balkans).
Some remarks:
- geo2rect filters out holes and only keeps the biggest polygon of multipolygons (tough luck, Northern Ireland and Northern Cyprus...)
- I filtered out some smaller European countries and islands from the geojson, like Andorra and Liechtenstein.
- I kept Australia in, as it participated in the Eurovision Song Contest. You can see it flying in from the bottom right corner.
- I had to override the scale and center of the map in geo2rect.js. geo2rect calculates these from the geometries, but because Russia is so big and Australia is in there, I had to zoom in on Europe manually.
You can read the whole making-of of the Eurosearch Song Contest on my site.