So its not really a VE bug but we do need a DeleteControl() added to the API. That said maybe a try catch to handle this situation would be great.
John
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>
<script type="text/javascript">
function GetMap()
{
map = new VEMap('MapDiv');
map.LoadMap(new VELatLong(-27, 152), 5 ,'r' ,false);
var el = document.createElement("div");
el.setAttribute('id',"VELoading");
el.innerHTML = "Test";
map.AddControl(el);
var el = document.getElementById("VELoading");
el.parentNode.removeChild(el);
map.Resize(800, 600);
}
</script>
</head>
<body onload="GetMap();">
<div id='MapDiv' style="position:relative; width:500px; height:500px;border:solid 1px black;"></div>
</body>
</html>

Bug with Resize() if you remove controls after AddControl()
paoloTheCool
I'll put a simple workaround in place for now until it gets fixed. When i find that simple work around i'll post it here
John.
AustinMyers
document.body.appendChild(newdiv);
For me I clear all these divs on any mouse movement (onstartcontinuouspan() and onstartzoom()) and refresh all points, lines and these divs onchangeview(). In most people cases this won't be as simple.
The only extra change was to set the postion of the new divs to absolute:
newdiv.style.position = "absolute";
John.
Mahyar154572
Thanks, John. I've filed a bug with the team on this.
I've asked for a DeleteControl or RemoveControl method for a while now, but have been content with the "removeChild()" approach. I guess we need to revisit that now.