# react-leaflet-canvas-markers

> React wrapper of Leaflet.Canvas-Markers for react-laeflet

Latest version **1.0.1** (published 2020-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-leaflet-canvas-markers
pnpm add react-leaflet-canvas-markers
yarn add react-leaflet-canvas-markers
bun add react-leaflet-canvas-markers
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-02-06 |
| First published | 2020-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Collins |
| Maintainers | jbccollins |
| Keywords | react, leaflet, react-leaflet, canvas, marker |

## Links

- npm: https://www.npmjs.com/package/react-leaflet-canvas-markers
- Repository: https://github.com/jbccollins/react-leaflet-canvas-markers
- Homepage: https://github.com/jbccollins/react-leaflet-canvas-markers#readme
- Issues: https://github.com/jbccollins/react-leaflet-canvas-markers/issues
- npm.io page: https://npm.io/package/react-leaflet-canvas-markers

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [leaflet](https://npm.io/package/leaflet.md) ^1.6.0
- [react-leaflet](https://npm.io/package/react-leaflet.md) ^2.6.1
- [leaflet-canvas-marker](https://npm.io/package/leaflet-canvas-marker.md) ^0.1.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-02-06
- 1.0.0 — 2020-02-06

## README

# react-leaflet-canvas-markers

React wrapper of [Leaflet.Canvas-Markers](
https://github.com/eJuke/Leaflet.Canvas-Markers) for [react-leaflet](https://github.com/PaulLeCam/react-leaflet)

## Description

Leaflet plugin for displaying markers on canvas instead of DOM. Working with `react-leaflet` v2.x and `leaflet` 1.x.

## Usage

```js
import CanvasMarkersLayer from 'react-leaflet-canvas-markers';
...
<Map center={[22.5774626732038, 114.04924392700197]} zoom={11}>
  <TileLayer
    url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"
    attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
  />
  <CanvasMarkersLayer>
    <Marker position={[22.5774626732038, 114.04924392700197]} icon={defaultIcon}>
        <Popup>
          <div>hello !</div>
        </Popup>
    </Marker>
  </CanvasMarkersLayer>
</Map>
```

## How to run demo app

**1.** Clone the repo:

```bash
git clone https://github.com/jbccollins/react-leaflet-canvas-markers.git
```

**2.** Install all dependencies:

```bash
yarn
```

**3.** Start the server:

```bash
yarn start
```

**4.** After starting the server, webpack should automatically open the following address:

```js
http://localhost:3000/
```

## License

MIT License

---
_Source: https://npm.io/package/react-leaflet-canvas-markers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
