Skip to content

mormahr/react-leaflet-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published