quadtree.addAll(data)
Adds the specified array of data to the quadtree, deriving each element’s coordinates ⟨x,y⟩ using the current x- and y-accessors, and return this quadtree. This is approximately equivalent to calling quadtree.add repeatedly:
for (var i = 0, n = data.length; i < n; ++i) { quadtree.add(data[i]); }
However, this method results in a more compact quadtree because the extent of the data is computed first before adding the data.
Please login to continue.