rem: var tile = this.addTile(tileBounds, new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left), tileoffsety - parseInt(this.map.layerContainerDiv.style.top)) ); tile.draw(); row.push(tile); 
add: var x = tileoffsetx; x -= parseInt(this.map.layerContainerDiv.style.left);  var y = tileoffsety; y -= parseInt(this.map.layerContainerDiv.style.top);  var px = new OpenLayers.Pixel(x, y); var tile;  tile = row[colidx++]; if (!tile) { tile = this.addTile(tileBounds, px); tile.draw(); row.push(tile); } else { tile.moveTo(tileBounds, px); } 
context:     _initTiles:function() {        //first of all, clear out the main div        this.div.innerHTML = "";        //now clear out the old grid and start a new one        this.clearGrid();        this.grid = new Array();        var viewSize = this.map.getSize();        var bounds = this.map.getExtent();        var extent = this.map.getMaxExtent();        var resolution = this.map.getResolution();        var tilelon = resolution*this.tileSize.w;        var tilelat = resolution*this.tileSize.h;                var offsetlon = bounds.left;        var tilecol = Math.floor(offsetlon/tilelon);        var tilecolremain = offsetlon/tilelon - tilecol;        var tileoffsetx = -tilecolremain * this.tileSize.w;        var tileoffsetlon = tilecol * tilelon;                var offsetlat = bounds.top;          var tilerow = Math.ceil(offsetlat/tilelat);        var tilerowremain = tilerow - offsetlat/tilelat;        var tileoffsety = -(tilerowremain+1) * this.tileSize.h;        var tileoffsetlat = tilerow * tilelat;                tileoffsetx = Math.round(tileoffsetx); // heaven help us        tileoffsety = Math.round(tileoffsety);        this.origin = new OpenLayers.Pixel(tileoffsetx,tileoffsety);        var startX = tileoffsetx;         var startLon = tileoffsetlon;                do {            var row = new Array();            this.grid.push(row);            tileoffsetlon = startLon;            tileoffsetx = startX;            do {                var tileBounds = new OpenLayers.Bounds(tileoffsetlon,                                                        tileoffsetlat,                                                        tileoffsetlon+tilelon,                                                       tileoffsetlat+tilelat);                var tile = this.addTile(tileBounds,                                         new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left),                                                             tileoffsety - parseInt(this.map.layerContainerDiv.style.top))                                                            );                tile.draw();                row.push(tile);                     tileoffsetlon += tilelon;                       tileoffsetx += this.tileSize.w;            } while (tileoffsetlon < bounds.right)                          tileoffsetlat -= tilelat;            tileoffsety += this.tileSize.h;        } while(tileoffsetlat > bounds.bottom - tilelat)    },
meta: 8310	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8310/7a3f9b8444b8148e6e015121b19f7491cfa12da5/KaMap.js/clean/lib/OpenLayers/Layer/KaMap.js