'use client'; import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; import L from 'leaflet'; import 'leaflet/dist/leaflet.css'; // Fix for default marker icon in Leaflet with Next.js const DefaultIcon = L.icon({ iconUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png', shadowUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png', iconSize: [25, 41], iconAnchor: [12, 41], }); L.Marker.prototype.options.icon = DefaultIcon; interface LeafletMapProps { address: string; lat: number; lng: number; } export default function LeafletMap({ address, lat, lng }: LeafletMapProps) { const position: [number, number] = [lat, lng]; return (
KLZ Cables
{address}
); }