viewer.canvas.οnmοusemοve=function(e,a){
var theNode=viewer.impl.hitTest(e.x,e.y,false);//这个函数的作用就是获取鼠标位置的构建id(dbId)
if(theNode)
{
//viewer.clearSelection();
viewer.toggleSelect(theNode.dbId);
}
};
var theMap=new Map();
for(var x=200;x<600;x=x+3)
{
for(var y=200;y<600;y=y+3)
{
var theNode = viewer.impl.hitTest(x,y,true);
if(theNode)
{
theMap.set(theNode.dbId,theNode.model);
}
}
}
theMap.forEach(function(sender,key,val){viewer.toggleSelect(key);});