geokdbush icon indicating copy to clipboard operation
geokdbush copied to clipboard

Updating README for correct kdbush usage

Open itsjoekent opened this issue 6 years ago • 1 comments

This had me stunned for a bit, if you follow the original README you'll get an error such as the following,

> kdbush(points, (p) => p.lon, (p) => p.lat);
TypeError: Cannot set property 'nodeSize' of undefined
    at KDBush (${project_path}/node_modules/kdbush/kdbush.js:169:19)

This is because kdbush is actually representing a class that has be constructed, as shown in both that projects README and example benchmark.

itsjoekent avatar Feb 02 '19 02:02 itsjoekent

Good catch! Can you also rename kdbush import to KDBush to match the new KDBush conventions?

mourner avatar Feb 03 '19 09:02 mourner