react-leaflet-rotated-imageoverlay
v1.0.3
Published
React wrapper for leaflet-imageoverlay-rotated.
Maintainers
Readme
react-leaflet-rotated-imageoverlay
This is a React wrapper for leaflet-imageoverlay-rotated, alongside its typings.
Installation
npm install react-leaflet-rotated-imageoverlayUsage
The component accepts the same parameters as leaflet-imageoverlay-rotated, just as props.
A ref/handle is also supported to access the underlying Leaflet element with getOverlay().
<RotatedImageOverlay
topleft={new LatLng(40.52256691873593, -3.7743186950683594)}
topright={new LatLng(40.5210255066156, -3.7734764814376835)}
bottomleft={new LatLng(40.52180437272552, -3.7768453359603886)}
imgSrc={palacioDeElPardoImage}
ref={rotatedImageOverlayRef}
options={{
opacity: .8,
interactive: true,
attribution: "Historical building plan © <a href='http://www.ign.es'>Instituto Geográfico Nacional de España</a>"
}}
/>Source Code
The source code is available on GitHub.
