js-vector-maps on github

I've been experimenting with some javascript classes that mimic the structure of mapnik's Layer/Style/Rule classes and render OSM data (via GeoJSON) to a <canvas> element. I've also finally taken a look at how github works, so I've decided to share the initial code there in case people are interested. If you don't want to check the code out for yourself there's a demo page here (tested in Firefox and Safari only, so far).

Oh absolutely, this is using raw XML from OpenStreetMap which is definitely not optimised for client-side rendering. Our experience with Flash is that CSV beats JSON beats XML for parsing speed there too.

For something like this to be useful at other scales you’d need to have a pre-processor or some server-side smarts that can generalise/simplify the data for you. At that point transforming to another data format (like JSON) would be trivial.

Random Etc. is the weblog and anagram of Tom Carden, a British design technologist based in San Francisco. Tom is a Data Visualization Engineer at Square and was previously a co-founder of Bloom and a Designer/Developer at Stamen.