Closed iaminamcom closed 2 years ago
I solved it. It's not big issue
import Map from "../components/Map";
import MarkerClusterGroup from "react-leaflet-markercluster";
import "react-leaflet-markercluster/dist/styles.min.css";
export default function Home() {
return (
<div>
<main style={{ width: "100%" }}>
<Map
style={{ width: "100%", height: "40rem" }}
center={[38.907132, -77.036546]}
zoom={12}
>
{({ Marker }) => (
<MarkerClusterGroup>
<Marker position={[49.8397, 24.0297]} />
<Marker position={[52.2297, 21.0122]} />
<Marker position={[52.2297, 21.0122]} />
</MarkerClusterGroup>
)}
</Map>
</main>
</div>
);
}
Hi I am working with
NextJS
and seeing error:ReferenceError: L is not defined
ScreenshotI'm following this guide https://github.com/colbyfayock/next-leaflet-starter Can you please tell how to solve this problem?