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

17
node_modules/react-leaflet/lib/ImageOverlay.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import { createElementObject, createLayerComponent, extendContext, updateMediaOverlay } from '@react-leaflet/core';
import { LatLngBounds, ImageOverlay as LeafletImageOverlay } from 'leaflet';
export const ImageOverlay = createLayerComponent(function createImageOveraly({ bounds , url , ...options }, ctx) {
const overlay = new LeafletImageOverlay(url, bounds, options);
return createElementObject(overlay, extendContext(ctx, {
overlayContainer: overlay
}));
}, function updateImageOverlay(overlay, props, prevProps) {
updateMediaOverlay(overlay, props, prevProps);
if (props.bounds !== prevProps.bounds) {
const bounds = props.bounds instanceof LatLngBounds ? props.bounds : new LatLngBounds(props.bounds);
overlay.setBounds(bounds);
}
if (props.url !== prevProps.url) {
overlay.setUrl(props.url);
}
});