RandomEtc/shapefile-js — pull request #1 by mattwigway (2011-12-14 06:07:27+00:00)
Title: OpenLayers

I added some code to allow shapefiles to be used in [OpenLayers](http://openlayers.org) so that Shapefiles can be used with other web data, symbolized, &c. There's an example [here](http://mattwigway.github.com/shapefile-js/ol_simple.html). Long-term, I hope to be able to integrate this as a format in OpenLayers, but this is a good proof of concept.

The code seems to work well with points, lines and polygons (I did not test the donut polygon case, but I think it should work). It'd be gret if you'd look over, though, as I imagine you understand the Shapefile format better than I do. I basically did a line-for-line port of layer.js. It converts Shapefile geometries to WKT and then passes that to OpenLayers. I blogged about it [here](http://indicatrix.wordpress.com/2011/12/13/shapefiles-in-openlayers/).