Dispose the map on exit

This Page is locked
Modified: 2007/12/11 11:02 by ViaVE Visitor
Little know method that disposes the map, add it to the body.
function DisposeMap() //dispose map etc
{
    if (map != null)
    {
        map.Dispose();
    }
}


usage:
<body onload="GetMap();" onunload="DisposeMap();">
It has been my experience that VE will attach to the onunload event itself. I found that I have to do this instead:
if (map && map.vemapcontrol) {
        map.Dispose();
}