react-leaflet-animated-marker

A wrapper for the PaulLeCam/react-leaflet Marker that smoothly animates itself when `position` prop changes.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-leaflet-animated-marker
1.0.24 years ago4 years agoMinified + gzip package size for react-leaflet-animated-marker in KB

Readme

React Leaflet Animated Marker
A wrapper for the PaulLeCam/react-leaflet Marker that smoothly animates itself when position prop changes.
Code Climate

Usage

The usage doesn't change in nothing from the original react-leaflet marker component.
Just use react-leaflet-animated-marker instead.
npm install react-leaflet-animated-marker

...
import L from 'leaflet';
import { Map, TileLayer } from 'react-leaflet';
import Marker from 'react-leaflet-animated-marker';

...

render() {
  return (
    ...
    <Map>
      <Marker position={this.state.position}/>
    </Map>
    ...
  )
}
...