Initial implementation should be an endpoint only accessible to admin users to kick it off. The logic should support a configurable 'distance range diameter-ish' value and the algorithm should then walk all data points, assess how close they are to any other data points, and if within configured proximity, collapse the n number of data points to one data point at roughly the center, creating a new hit marker and disabling markers that were combined.
(Just think a circle. Any points in the circle should be combined into 1 in the center of the circle)
Not much activity on the project above, but does have the methods we need (method to pass in an array of coordinates (lat,long) and determining distance as well as merging to center). If you find something better that's cool as well.
Initial implementation should be an endpoint only accessible to admin users to kick it off. The logic should support a configurable 'distance range diameter-ish' value and the algorithm should then walk all data points, assess how close they are to any other data points, and if within configured proximity, collapse the n number of data points to one data point at roughly the center, creating a new hit marker and disabling markers that were combined.
(Just think a circle. Any points in the circle should be combined into 1 in the center of the circle)
You might start by looking at this https://www.npmjs.com/package/geolib or finding another Node friendly library for Geo stuff.
Not much activity on the project above, but does have the methods we need (method to pass in an array of coordinates (lat,long) and determining distance as well as merging to center). If you find something better that's cool as well.