简体   繁体   中英

How to read/load zipped Shapefile on leaflet/react-leaflet in reactjs

do anyone knows how to read/load shapefile (in zip format) on leaflet in reactjs? In this project I had given a zipped shapefile and i want to show that data on Leaflet OSM map on react application. Project Details module/ library: react(18.2.0), leaflet(1.9.3), react-leaflet(4.1.0), shpjs(4.0.4)

Problem faced: I tried few examples but they didn't worked as they were of old versions.(example link: https://codesandbox.io/s/add-zipped-shapefiles-to-a-react-leaflet-map-e7cr0?file=/src/Shapefile.jsx )

I converted the shapefile into KML online and imported it to the application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM