This commit is contained in:
2025-09-12 07:32:32 -07:00
parent 4d5fca6a5e
commit 49208df277
2978 changed files with 421237 additions and 394 deletions

18
node_modules/@react-leaflet/core/lib/attribution.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { useEffect, useRef } from 'react';
export function useAttribution(map, attribution) {
const attributionRef = useRef(attribution);
useEffect(function updateAttribution() {
if (attribution !== attributionRef.current && map.attributionControl != null) {
if (attributionRef.current != null) {
map.attributionControl.removeAttribution(attributionRef.current);
}
if (attribution != null) {
map.attributionControl.addAttribution(attribution);
}
}
attributionRef.current = attribution;
}, [
map,
attribution
]);
}