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