Code Snippet
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
<script>
var map = null;
var start
var timerID = null
var timerRunning = false
var delay = 0
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(new VELatLong(38,-171),2,'r',false,VEMapMode.Mode2D,false);
// startup location of minimap
map.ShowMiniMap(200,200);
InitializeTimer();
}
function InitializeTimer()
{
start = 200;
StopTheClock();
StartTheTimer();
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function StartTheTimer()
{
if (start==-200)
{
StopTheClock();
// mini map hidden
}
else
{
// change to improve rendering
start = start - 2;
// for a Show() routine, simply reverse the incremental values of var start
map.ShowMiniMap(start,200);
timerRunning = true;
timerID = self.setTimeout("StartTheTimer()", delay);
}
}
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:1000px; height:800px;"></div>
</body>
</html>