search after load returns 0 points
biggerlambda opened this issue · comments
Bigger Lambda commented
I did the following:
var arr = [[1,2],[3,4],[5,6]];
var rtree = new rbush(2);
rtree.load(arr);
var pts = rtree.search({minX:0,minY:0,maxX:10,maxY:10});
This returns 0 points. On investigating I find that this.data of rbush has minX,maxX etc set to NaN.
I did the following modification but got the same result;
. Using arrays of rectangles where minX and maxX were same eg..
var arr = [ {minX:1, minY:2, maxX:1, maxY:2} ....]
var rtree = new rbush(4);
Bigger Lambda commented
found the problem