Random Etc. Notes to self. Work, play, and the rest.

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).


Wow, seriously impressive. Remarkably responsive, too, even from a wee connection in rural France.

Flickr had an interesting writeup on how to most performantly encode data for transmission to the client. Might be useful here? http://code.flickr.com/blog/2009/03/18/building-fast-client-side-searches/

Posted by Blaine Cook on 8 June 2009 @ 11am

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.

Posted by TomC on 8 June 2009 @ 4pm