1.0.0 • Published 2 years ago

react-leaflet-icon v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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} />
  </>
}