[Cartoweb-users] memory leak solving
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Fri Feb 9 09:37:27 EST 2007
Hi list,
I am trying to solve a big memory leak in a website which uses Cartoweb
javascript code.
The problem is mainly that the <IMG> which holds the map (id is
map_raster_img), will leak memory. This does not happen in the Cartoweb
demo site, although that one is not free of memory leaks as well.
Does anybody have an idea what could be causing this? Any pointers
appreciated. Thanks in advance.
This is the initMap code used:
function initMap() {
ext = parent.EmptyFrame.mapserv.imgext.value.split(' ');
xmin = parseInt(ext[0]);
ymin = parseInt(ext[1]);
xmax = parseInt(ext[2]);
ymax = parseInt(ext[3]);
mainmap.setExtent(xmin,ymin,xmax,ymax);
factor = 1;
var rasterLayer = new Layer("raster");
var feature = new Raster(parent.FormFrame.map,'map_raster_img');
rasterLayer.addFeature(feature);
mainmap.addLayer(mainmap,rasterLayer);
var drawLayer = new Layer("drawing");
mainmap.addLayer(mainmap,drawLayer);
mainmap.currentLayer = drawLayer;
hideLabel();
tool = GetCookie('toolcookie');
if (!tool) {tool='zoomin';}
parent.ScriptFrame.setTool(tool);
}
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Cartoweb-users
mailing list