Skip to content

Commit a3c83c4

Browse files
committed
TODO: support multiple shapefiles - updated README
1 parent 67a6d36 commit a3c83c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![example](https://github.com/oxy86/react-leaflet-maps-shapefile/raw/main/public/app-screenshot.jpg)](#)
44

55

6-
This example React application uses [react-leaflet](https://www.npmjs.com/package/react-leaflet) and [shpjs](https://www.npmjs.com/package/shpjs?activeTab=readme) npm packages to display a full-screen interactive map (like google maps, without geolocation, but for free) with a simple button to upload geospatial data files in zipped [shapefile (.shp) spatial data format](https://en.wikipedia.org/wiki/Shapefile). As a bonus, it shows a marker on the centre of the map, and displays the latitude/longitude of that marker. :P
6+
This example React application uses [react-leaflet](https://www.npmjs.com/package/react-leaflet) and [shpjs](https://www.npmjs.com/package/shpjs?activeTab=readme) npm packages to display a full-screen interactive map (like google maps, without geolocation, but for free) with a simple button to upload geospatial data files in zipped [shapefile (.shp) spatial data format](https://en.wikipedia.org/wiki/Shapefile). The geospatial data are then displayed in an Overlay. At the moment, only a single Overlay is supported (cannot render multiple shapefiles). As a bonus, it shows a marker on the centre of the map, and displays the latitude/longitude of that marker. :P
77

88
Supports 30+ free [Tile Layers](https://wiki.openstreetmap.org/wiki/Tile_servers), i.e. OpenStreetMap, Stamen, ESRI, Stadia, USGI, etc.
99
Actually, the app includes an adapted copy of the [Leaflet-providers](https://github.com/leaflet-extras/leaflet-providers) configurations for various tiles providers. Fork it and edit the lib/TileProviders.js file to add your API keys, if you want to use one of the non-free tile providers (api key support not tested, though, you may have to hack it).

src/components/MyMap.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const MyMap = () => {
100100

101101

102102

103-
103+
104104
let ShapeLayers = null;
105105
if (geodata !== null) {
106106
ShapeLayers = (

0 commit comments

Comments
 (0)