import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; import "leaflet/dist/leaflet.css"; // Leaflet CSS import React from "react"; const points = [ { id: 1, name: "Point A", position: [51.505, -0.09] }, { id: 2, name: "Point B", position: [51.515, -0.1] }, { id: 3, name: "Point C", position: [51.525, -0.11] }, ]; const InteractiveMap = () => { return (
{/* Tile Layer for map background */} {/* Add markers for points */} {points.map((point) => ( {/* Popup when marker is clicked */} {point.name} {/* Optional hover tooltip */} ))}
); }; export default InteractiveMap;