react-leaflet-fly-in-marker
This packages provides a wrapper for leaflet markers allowing you to animate them in a similar way to google maps icons.
The animation part of this relies on react-spring
Usage
import FlyInMarker from 'react-leaflet-fly-in-marker'; { return <div ="custom-marker"> <svg ="30px" ="30px" ="0 0 12 16" ="rotate(180)" > <path = ="black" ="0.5" ="miter" ="M 6 1 c -2 3 -5 5 -5 9 0 7 10 7 10 0 0 -4 -3 -6 -5 -9z" /> </svg> </div> ;}; // and in the render: <FlyInMarker = = = // = =/>
See the demo directory for a full app using this
Attribution
This is based off of https://github.com/DimiMikadze/create-react-library Check it out for more goodies!