Skip to content

MErenTalan/react-leaflet-markers-in-polygon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Use the package manager you want

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 :

[
{
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

<EditControl
// Other stuff
onCreated={(e)=>{ polygonChecker( theMarkerArray ) }}
onDeleted={(e) => {
_deleted(e)
}}
// Other stuff
></EditControl>

CONTACT

You're free to ask anything to me via [email protected]

About

Helper for get markers in polygon on react-leaflet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published