Can be used for dependency management in npm-based
workflows. To use, add the following in another
project's package.json:
"js-shapefile-to-geojson": "git://github.com/wavded/js-shapefile-to-geojson.git"
Shapefile and DBF constructors now support referencing files
via both url and a HTML 5 File API handle. This can be used
to load and map content added to file input(s) and processed
on the client browser.
FileReader and FileReaderSync are both used depending upon
availability to make this functionality work in both Gecko
and Webkit inside Web Workers.
Workers were being constructed with a hardcoded path of
'shapefile.js'. The new jsRoot option can be used to
specify an alternate location. For example:
shapefile = new Shapefile({
shp: "testdata/world.shp",
dbf: "testdata/world.dbf",
jsRoot: '/js-shapefile-to-geojson/'
}, function(data) ...
While some support existed, an attempt was being
made to create an unnecessary(?) bounding box for
each point feature. Also swapped access of the x,y
coordinates from record.geometry.x|y to record.x|y.