next nearest neighbors for leaflet
var gj = L;var nearest = ;
(or without the
.min. if you want more debugging power)
npm install leaflet-knn
Generates a lookup function from an
L.geoJson layer object.
API is the same as the sphere-knn API
for the lookup function, but with nice handling for
Given a point, find the nearest points to it. If the index contains multi-point features, like lines, polygons, and so on, it returns points in those features and can return more than one point in each feature.
nearest, except multiple matches in the same multi-point feature are
collapsed, so the array returned has one result per layer.