Sửa lỗi khi click vào nút bản đồ

This commit is contained in:
2026-06-14 09:48:09 +07:00
parent 5cfb5b9d15
commit b3519c94cd
10 changed files with 89 additions and 51 deletions
+6
View File
@@ -4,6 +4,12 @@ import { X, MapPin, Loader2, Map as MapIcon } from 'lucide-react';
import { useTourStore } from './useTourStore.js';
import { MapContainer, TileLayer, Marker, useMapEvents, useMap } from 'react-leaflet';
import L from 'leaflet';
delete L.Icon.Default.prototype._getIconUrl;
L.Icon.Default.mergeOptions({
iconRetinaUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png',
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',
});
const MapPicker = ({ onPick, center }) => {
const [menuPos, setMenuPos] = useState(null);
const menuRef = useRef(null);