Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
serenade2400 committed Oct 3, 2024
1 parent 11eeaeb commit 62fa2bf
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 12 deletions.
14 changes: 14 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'leaflet': require.resolve('leaflet'),
};
return config;
},
};

module.exports = nextConfig;

1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ const nextConfig = {

};


export default nextConfig;
55 changes: 45 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
},
"dependencies": {
"@vercel/speed-insights": "^1.0.12",
"leaflet": "^1.9.4",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-leaflet": "^4.2.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/node": "22.7.4",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
Expand Down
3 changes: 3 additions & 0 deletions src/components/Mapcomponent.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
"use client";
import 'leaflet/dist/leaflet.css';
import dynamic from 'next/dynamic';
import React, { useState } from 'react';
import { MapContainer, TileLayer, Marker, Popup, GeoJSON } from 'react-leaflet';
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';



import uttarakhandBoundary from '../components/uttarakhand.json'; // existing import

// Fix for default marker icon issue in React
Expand Down

0 comments on commit 62fa2bf

Please sign in to comment.