heigeo / leaflet.wms

A Leaflet plugin for working with Web Map services, providing: single-tile/untiled/nontiled layers, shared WMS sources, and GetFeatureInfo-powered identify.
http://heigeo.github.io/leaflet.wms/
MIT License
242 stars 135 forks source link

Add leaflet.wms to react leaflet project with yarn / npm and next.js #75

Open Skerre opened 2 years ago

Skerre commented 2 years ago

Hello dear people! I cannot get leaflet.wms installed in my project with npm i leaflet.wms, following the advice from this post on https://stackoverflow.com/questions/61123565/how-to-call-getfeatureinfo-from-react-leaflet

I have the following dependencies in my package.json file:

{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "axios": "^0.27.2", "leaflet": "^1.8.0", "leaflet-defaulticon-compatibility": "^0.1.1", "leaflet-geosearch": "^3.6.0", "lodash": "^4.17.21", "mapbox-gl": "^2.8.2", "next": "latest", "next-themes": "^0.2.0", "node-sass": "^7.0.1", "papaparse": "^5.3.2", "react": "^17.0.2", "react-beautiful-dnd": "^13.1.0", "react-dom": "^17.0.2", "react-dropdown": "^1.10.0", "react-leaflet": "^4.0.0", "react-leaflet-custom-control": "^1.2.6", "react-leaflet-textpath": "^2.1.1", "react-map-gl": "^7.0.11", "react-responsive-carousel": "^3.2.23", "react-responsive-modal": "^6.2.0", "reactjs-popup": "^2.0.5", "sass": "^1.54.5", "use-dynamic-refs": "^1.0.0" }, "devDependencies": { "@types/node": "17.0.4", "@types/react": "17.0.38", "autoprefixer": "^10.4.5", "eslint": "^8.22.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.31.0", "gh-pages": "^4.0.0", "json-loader": "^0.5.7", "postcss": "^8.4.5", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.1.1", "tailwind-scrollbar": "^1.3.1", "tailwindcss": "^3.0.7", "typescript": "4.5.4" } }