Skip to content
JavaScript Other
Latest commit 21dde12 Aug 13, 2015 @calvinmetcalf fix up demo
Failed to load latest commit information.
.eslintrc add eslintrc Aug 13, 2015
.gitignore updated git ignore Aug 8, 2013
LICENSE Initial commit Aug 8, 2013 Updated docs to include new importUrl parameter May 13, 2015
catiline.js first Aug 8, 2013 first Aug 8, 2013
gh-pages.css ribbon Aug 8, 2013
index.html fix up demo Aug 13, 2015
leaflet.shpfile.js make it more like my other projects Aug 13, 2015 first Aug 8, 2013
shp.js fix up demo Aug 13, 2015


requires shapefile-js plus if you want it to be done in a worker, you'll need catiline.


new L.Shapefile(arrayBuffer or url[,options][,importUrl]);

L.shapefile(arrayBuffer or url[,options][,importUrl]);

Options are passed to L.Geojson as is. First argument is either an array buffer of a zipped shapefile, the url to a zipped shapefile, or the url to file.shp (this assumes file.dbf exists). The importUrl parameter allows you to change where a worker loads in shp.js when using catiline and defaults to shp.js.

To easily try this out using your own shapefile, see the demo at, where you can drag-and-drop your own shapefile and have it displayed on the map.

Something went wrong with that request. Please try again.