add: if(numRows==0) numRows=1; 
context: function reloadGrid(){	gridRectWidth=parseInt(mapElemDimension*X_FACTOR);		gridRectHeight=parseInt(mapElemDimension*Y_FACTOR);	var numCols = parseInt(map.getWidth()/gridRectWidth);	//alert("numcols="+numCols+" mapWidth/gridRectWidth " +map.getWidth()+"/"+gridRectWidth);	var numRows = parseInt(map.getHeight()/gridRectHeight);	//alert("numrows="+numRows+" mapHeight/gridRectHeight " +map.getHeight()+"/"+gridRectHeight);	maxNumOfElements = numCols*numRows;	var nodeGrid=new Array(numCols);	for(i = 0; i< numCols; i++){		nodeGrid[i]=new Array(numRows);	}	//alert(nodeGrid);	var nodes =	map.mapElements;	for(n in nodes){		var i = parseInt(nodes[n].x / gridRectWidth);		//if map dimension are not in 4/3 format		if(i>=numCols) i=numCols-1;		var j =	parseInt(nodes[n].y / gridRectHeight);		if(j>=numRows) j=numRows-1;		//alert(nodes[n].x+" "+nodes[n].y+" - "+i+" "+j);		if(	nodeGrid[i][j] == undefined)			nodeGrid[i][j]=1;		else nodeGrid[i][j]++;	}		//alert(nodeGrid);	return nodeGrid;}
meta: 8692	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8692/d5b0121ba147eea97a444ae288f11e94118d5a54/MapElemPositioning.js/clean/opennms-webapp/src/main/webapp/map/MapElemPositioning.js