# react-leaflet-markers-in-polygon

> This package will help you to see markers in polygon that you draw with react-leaflet-draw

Latest version **1.1.3** (published 2022-10-20) · MIT license · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2022-10-20 |
| First published | 2022-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 26.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | merentalan |
| Keywords | react, leaflet, map, markers, polygon, EditControl, leaflet-draw |

## Links

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

## Dependencies (12)

- [turf](https://npm.io/package/turf.md) ^3.0.14
- [react](https://npm.io/package/react.md) ^18.2.0
- [leaflet](https://npm.io/package/leaflet.md) ^1.9.2
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [@turf/turf](https://npm.io/package/@turf/turf.md) ^6.5.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [react-leaflet](https://npm.io/package/react-leaflet.md) ^4.1.0
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [react-leaflet-draw](https://npm.io/package/react-leaflet-draw.md) ^0.20.4
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## 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.1.3 (latest) — 2022-10-20
- 1.1.2 — 2022-10-18
- 1.1.1 — 2022-10-18
- 1.1.0 — 2022-10-18
- 2.0.0 — 2022-10-18
- 1.0.0 — 2022-10-17

## README

# Installation
Use the package manager you want

```bash 
npm install react-leaflet-markers-in-polygon
```
# Using of polygonChecker function 

You will send an array that created by objects that includes id, lat and lng to PolygonChecker function.

Example :
```javascript
[
{
id: 1,
lat: 39.634872,
lng: 32.768745,
// ...You may have more data or not
},
{
id: 2,
lat: 38.746852,
lng: 32.134785,
// ...You may have more data or not
}
]
```
polygonChecker function will return list that contains leaflet id of polygon and included marker ids

# How to implement it

import  _delete and polygonChecker functions from "react-leaflet-markers-in-polygon"
add to EditControl's onChange and onDelete events the polygonChecker and _delete functions like this
```javascript
<EditControl
// Other stuff
onCreated={(e)=>{ polygonChecker( theMarkerArray ) }}
onDeleted={(e) => {
_deleted(e)
}}
// Other stuff
></EditControl>
```

# CONTACT
You're free to ask anything to me via merentalan@gmail.com

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