react-leaflet-icon
v1.0.0
Published
Install using npm or yarn:
Downloads
8
Readme
react-leaflet-icon
Install using npm or yarn:
npm install react-leaflet-icon
Usage
import { useLeafletIcon } from "react-leaflet-icon"
import { Marker } from "react-leaflet"
function SomeComponent({ position }) {
const [markerIcon, MarkerIcon] = useLeafletIcon()
return <>
<MarkerIcon>
{/* custom icon content */}
</MarkerIcon>
<Marker position={position} icon={markerIcon} />
</>
}