Open leplatrem opened 11 years ago
Drag & Drop a Shapefile, get a Geojson map : https://github.com/daguar/shapefile-to-webmap/
This fork supports shapefiles - https://github.com/vamsiampolu/Leaflet.FileLayer
The one @Luen shared is really good. However, it has a drawback which is only one zipped shapefile can be uploaded. When you try to upload a second zipped shapefile, you unfortunately get no response : ( Interestingly, this doesn't apply to GeoJson uploads. You can upload as many GeoJson files as you want successively without refreshing the page🤷🏼♀️
I think that things changed about GIS files formats since this issue was initially created.
If we should add the support for GIS files, I would rather choose an opensource and stronger format such as Geopackage (.gpkg).
Several tools are moving from .SHP to .GPKG.
http://switchfromshapefile.org/
We initially choose to focus on format easy to manage server side, and thought it was easy to convert a shapefile or Geopackage file into Geojson with softwares such as QGIS.
But why not manage a GIS format such as GPKG.
I'm a supporter of using open formats so completely agree that GPKG can be a good option @camillemonchicourt. To be honest, GeoJson is also enough to meet my needs. However, as indicated in the link you shared, the answer to your question is "ESRI Shapefile has been around since the early 1990s and is still the most commonly used vector data exchange format." The majority still tend to use this format, therefore SHP flexibility is somehow required🤷🏼♀️
It's time to move from SHP to GPKG. If we all implement SHP in our tools, it will never change. 🤔 QGIS is now privileging GPKG.
See https://github.com/calvinmetcalf/leaflet.shapefile