d3.geom.quadtree不工作?

时间:2015-11-29 12:15:38

标签: d3.js quadtree

下面的代码,然后是console.log。看起来四叉树结构是空的。为什么?。我的代码来自示例 https://www.phase2technology.com/blog/using-d3-quadtrees-to-power-an-interactive-map-for-bonnier-corporation/

 <div class="featurette">
  <img class="featurette-image img-responsive pull-left center-block" src="http://www.placehold.it/400/F84065/000" alt="#">

  <div class="purchase-album">
    <div class="album">
      <img class="img-responsive" src="http://www.placehold.it/200/fa8ca2" />
      <div class="lead">available now:</div>
    </div>
    <div class="space">
    </div>
    <p class="lead text-center available "></p>
    <a href="#" target="_blank">
      <button type="button" class="btn btn-default btn-lg outline" type="submit">iTunes</button>
    </a>

    <a href="#" target="_blank">
      <button class="btn btn-default btn-lg outline" type="submit">loudr</button>
    </a>
  </div>
</div>

<div class="enter">

  <button type="button" class="btn btn-default btn-lg outline" type="submit">
    <a href="#"> enter</a>
  </button>
</div>
</div>

的console.log:

thepoint [23.4183,62.775] iii 0 ....

pointsraw c {:Object} :Object22.0064,62.714,1:Array [3] 0:22.00641:62.7142:1length:3__proto__:Array [0] 23.65,62.85,3:Array [3] 23.675,62.5236111,5:数组[3] 23.4183,62.775,0:数组[3] 23.7428,62.266,2:数组[3] 23.1977778,62.6272222,4:数组[3] proto :c

quadtree00对象{leaf:true,nodes:Array [0],point:null,x:null,y:null} add:(n)find:(n)leaf:truenodes:Array [0] point:nullvisit :(n)x:nully:null__proto__:Object

所以四叉树似乎是空的,但无法弄清楚原因。非常感谢,谢谢。

0 个答案:

没有答案