import React, { useState, useRef, useMemo } from "react"; import { MapContainer, TileLayer, FeatureGroup, Rectangle, useMap, LayerGroup, ZoomControl, ScaleControl, } from "react-leaflet"; import "leaflet/dist/leaflet.css"; import "leaflet-draw/dist/leaflet.draw.css"; import { EditControl } from "react-leaflet-draw"; import "leaflet-draw"; import "./index.scss"; import grid from "../../assets/images/grid.png"; const outerBounds = [ [50.505, -29.09], [52.505, 29.09], ]; const LeafletMap = () => { const leafEl = useRef(null); const onCreated = (e) => { const drawnItems = leafEl.current._layers; console.log({ drawnItems }); }; return ( ); }; export default LeafletMap;