It is inspired by leaflet-pip,and it is its simple extension. If you prefer the software stability, you can see leaflet-pip
leaflet-pip is to select a polygon from multipolygon GeoJSON based on a point feature, but my idea is that select points from points Geojson based on a polygon feature. These two geo-processings are based on the same principle, spatial query -- point in polygon (pip). Therefore, the extension for leaflet-pip comes.
####example
var selectedpoints = leafletPip.pointsInPolygon(L.geoJson(point.geojson),L.geoJson(singlepolygon.geojson))
这个受leaflet-pip启发,是它的一个扩展。如果你需要稳定性,你可以先看看leaflet-pip
leaflet-pip是通过点要素的相交关系从多面状GeoJSON中选择一个面状,但是我的想法是通过面要素的相交关系从点的GeoJSON中选择多个点。这两个处理过程都基于同样的原理--空间查询。
####例子
var selectedpoints = leafletPip.pointsInPolygon(L.geoJson(point.geojson),L.geoJson(singlepolygon.geojson))