react-leaflet-icon
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-leaflet-icon

Weekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

15.1 kB

Total Files

17

Last publish

Collaborators

  • mormahr