quadtree.addAll()

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.

doc_D3_Js
2016-11-24 10:28:31
Comments
Leave a Comment

Please login to continue.