Overview
What the Virtual earth is, I do not want to explain more. After the launch of its own Virtual Earth, Microsoft has opened up a lot of APIs so that we can easily integrate into our own applications.
Integrating in HTML
Before we start, let's take a quick look at how to integrate Virtual Earth in HTML, and you can go here and query the relevant APIs, and we'll see how to load the default map, as shown in the following code:
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript"
src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>
<script type="text/javascript">
var map = null;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap();
}
</script>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:480px; height:320px;"></div>
</body>
In fact, this code is very simple, first introduced the Virtual Earth Map control, and use JavaScript to load the map.