@parkassist/pa-ui-library
Version:
INX Platform elements
23 lines • 563 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { SVGOverlay } from 'react-leaflet';
import { LatLng, LatLngBounds } from 'leaflet';
export function AreaSelection({
start,
end
}) {
const bounds = new LatLngBounds(new LatLng(end.y, end.x), new LatLng(start.y, start.x));
return _jsx(SVGOverlay, {
bounds: bounds,
children: _jsx("rect", {
x: '0',
y: '0',
width: '100%',
height: '100%',
stroke: 'blue',
fill: 'blue',
fillOpacity: 0.1,
strokeWidth: 2,
strokeDasharray: '3 1'
})
});
}