Web Map Server (WMS) on MSN virtual earth 3D
This script will open Rijkswaterstaat Netherlands Highway Web Map Server data on MSN virtual earth 3D only.
SHUMAN
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
<script>
var map = null;
var pinID = 1;
var findcontrol = false;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(new VELatLong(51.9099,4.5349), 15, 'h', false, VEMapMode.Mode3D);
GetTiles();
}
function GetTiles()
{
var bounds =
[new VELatLongRectangle(new VELatLong(54,2), new VELatLong(53.75,3)), new VELatLongRectangle(new VELatLong(53.75,2), new VELatLong(53.5,3)),
new VELatLongRectangle(new VELatLong(53.5,2), new VELatLong(53.25,3)), new VELatLongRectangle(new VELatLong(53.25,2), new VELatLong(53,3)),
new VELatLongRectangle(new VELatLong(53,2), new VELatLong(52.75,3)), new VELatLongRectangle(new VELatLong(52.75,2), new VELatLong(52.5,3)),
new VELatLongRectangle(new VELatLong(52.5,2), new VELatLong(52.25,3)), new VELatLongRectangle(new VELatLong(52.25,2), new VELatLong(52,3)),
new VELatLongRectangle(new VELatLong(52,2), new VELatLong(51.75,3)), new VELatLongRectangle(new VELatLong(51.75,2), new VELatLong(51.5,3)),
new VELatLongRectangle(new VELatLong(51.5,2), new VELatLong(51.25,3)), new VELatLongRectangle(new VELatLong(51.25,2), new VELatLong(51,3)),
new VELatLongRectangle(new VELatLong(54,3), new VELatLong(53.75,4)), new VELatLongRectangle(new VELatLong(53.75,3), new VELatLong(53.5,4)),
new VELatLongRectangle(new VELatLong(53.5,3), new VELatLong(53.25,4)), new VELatLongRectangle(new VELatLong(53.25,3), new VELatLong(53,4)),
new VELatLongRectangle(new VELatLong(53,3), new VELatLong(52.75,4)), new VELatLongRectangle(new VELatLong(52.75,3), new VELatLong(52.5,4)),
new VELatLongRectangle(new VELatLong(52.5,3), new VELatLong(52.25,4)), new VELatLongRectangle(new VELatLong(52.25,3), new VELatLong(52,4)),
new VELatLongRectangle(new VELatLong(52,3), new VELatLong(51.75,4)), new VELatLongRectangle(new VELatLong(51.75,3), new VELatLong(51.5,4)),
new VELatLongRectangle(new VELatLong(51.5,3), new VELatLong(51.25,4)), new VELatLongRectangle(new VELatLong(51.25,3), new VELatLong(51,4)),
new VELatLongRectangle(new VELatLong(54,4), new VELatLong(53.75,5)), new VELatLongRectangle(new VELatLong(53.75,4), new VELatLong(53.5,5)),
new VELatLongRectangle(new VELatLong(53.5,4), new VELatLong(53.25,5)), new VELatLongRectangle(new VELatLong(53.25,4), new VELatLong(53,5)),
new VELatLongRectangle(new VELatLong(53,4), new VELatLong(52.75,5)), new VELatLongRectangle(new VELatLong(52.75,4), new VELatLong(52.5,5)),
new VELatLongRectangle(new VELatLong(52.5,4), new VELatLong(52.25,5)), new VELatLongRectangle(new VELatLong(52.25,4), new VELatLong(52,5)),
new VELatLongRectangle(new VELatLong(52,4), new VELatLong(51.75,5)), new VELatLongRectangle(new VELatLong(51.75,4), new VELatLong(51.5,5)),
new VELatLongRectangle(new VELatLong(51.5,4), new VELatLong(51.25,5)), new VELatLongRectangle(new VELatLong(51.25,4), new VELatLong(51,5)),
new VELatLongRectangle(new VELatLong(54,5), new VELatLong(53.75,6)), new VELatLongRectangle(new VELatLong(53.75,5), new VELatLong(53.5,6)),
new VELatLongRectangle(new VELatLong(53.5,5), new VELatLong(53.25,6)), new VELatLongRectangle(new VELatLong(53.25,5), new VELatLong(53,6)),
new VELatLongRectangle(new VELatLong(53,5), new VELatLong(52.75,6)), new VELatLongRectangle(new VELatLong(52.75,5), new VELatLong(52.5,6)),
new VELatLongRectangle(new VELatLong(52.5,5), new VELatLong(52.25,6)), new VELatLongRectangle(new VELatLong(52.25,5), new VELatLong(52,6)),
new VELatLongRectangle(new VELatLong(52,5), new VELatLong(51.75,6)), new VELatLongRectangle(new VELatLong(51.75,5), new VELatLong(51.5,6)),
new VELatLongRectangle(new VELatLong(51.5,5), new VELatLong(51.25,6)), new VELatLongRectangle(new VELatLong(51.25,5), new VELatLong(51,6)),
new VELatLongRectangle(new VELatLong(54,6), new VELatLong(53.75,7)), new VELatLongRectangle(new VELatLong(53.75,6), new VELatLong(53.5,7)),
new VELatLongRectangle(new VELatLong(53.5,6), new VELatLong(53.25,7)), new VELatLongRectangle(new VELatLong(53.25,6), new VELatLong(53,7)),
new VELatLongRectangle(new VELatLong(53,6), new VELatLong(52.75,7)), new VELatLongRectangle(new VELatLong(52.75,6), new VELatLong(52.5,7)),
new VELatLongRectangle(new VELatLong(52.5,6), new VELatLong(52.25,7)), new VELatLongRectangle(new VELatLong(52.25,6), new VELatLong(52,7)),
new VELatLongRectangle(new VELatLong(52,6), new VELatLong(51.75,7)), new VELatLongRectangle(new VELatLong(51.75,6), new VELatLong(51.5,7)),
new VELatLongRectangle(new VELatLong(51.5,6), new VELatLong(51.25,7)), new VELatLongRectangle(new VELatLong(51.25,6), new VELatLong(51,7)),
new VELatLongRectangle(new VELatLong(54,7), new VELatLong(53.75,8)), new VELatLongRectangle(new VELatLong(53.75,7), new VELatLong(53.5,8)),
new VELatLongRectangle(new VELatLong(53.5,7), new VELatLong(53.25,8)), new VELatLongRectangle(new VELatLong(53.25,7), new VELatLong(53,8)),
new VELatLongRectangle(new VELatLong(53,7), new VELatLong(52.75,8)), new VELatLongRectangle(new VELatLong(52.75,7), new VELatLong(52.5,8)),
new VELatLongRectangle(new VELatLong(52.5,7), new VELatLong(52.25,8)), new VELatLongRectangle(new VELatLong(52.25,7), new VELatLong(52,8)),
new VELatLongRectangle(new VELatLong(52,7), new VELatLong(51.75,8)), new VELatLongRectangle(new VELatLong(51.75,7), new VELatLong(51.5,8)),
new VELatLongRectangle(new VELatLong(51.5,7), new VELatLong(51.25,8)), new VELatLongRectangle(new VELatLong(51.25,7), new VELatLong(51,8))];
var tileSourceSpec = new VETileSourceSpecification();
tileSourceSpec.ID = "Top250";
tileSourceSpec.TileSource = "http://www.rijkswaterstaat.nl/services/geoservices/basispakket/dtb?&service=WMS&version=1.0.9&Request=GetMap&Layers=DTB&Styles=&SRS=EPSG:4326&BBOX=%16,%17,%18,%19&WIDTH=256&HEIGHT=256&TRANSPARENT=TRUE&FORMAT=image/gif";
tileSourceSpec.NumServers = 1;
tileSourceSpec.Bounds = bounds;
tileSourceSpec.MinZoom = 2;
tileSourceSpec.MaxZoom = 18;
map.AddTileSource(tileSourceSpec);
var tileLayer = new VELayerSpecification(VELayerType.VETileSource,"1","Top250");
tileLayer.ZIndex=100;
tileLayer.Opacity=0.8;
map.AddLayer(tileLayer);
}
function DeleteTileLayer()
{
map.DeleteLayer("1");
map.DeleteTileSource("Top250");
}
function ShowHideFindControl()
{ if (findcontrol)
{
map.HideFindControl();
findcontrol=false;
}
else
{
map.ShowFindControl();
findcontrol=true;
} }
</script>
</head>
<body onload="GetMap();" bgcolor="#F5F1FE">
<div style="position: middle; width: 842; height: 75"> <h2><font color="#006699" size="4" face="Arial">
</font><font face="Impact" size="5"><font color="#006699">WMS coupling with MSN Virtual
Earth 3D </font> </font></h2> <p align="left"><font color="#003366" face="ISOCT"> <font size="2">
</font><font size="3">Digitaal Topografisch Bestand DTB, AGI
, RWS </font></font>
<div id='myMap' style="position: middle; width: 847; height: 490"></div>
<p align="left"><b><font color="#000080">
<INPUT id="hide" type="button" value="Delete WMS layer" name="delete" onclick="DeleteTileLayer();" style="background-color: #C4E1FF; color: #000080; border-style: solid"></font></b>
<b><font color="#000080"><INPUT id="hide0" type="button" value="Add WMS layer" name="hide" onclick=" GetTiles()" style="background-color: #C4E1FF; color: #000080; border-style: solid"></font>
<INPUT id="show_hide" type="button" value="Show/Hide City Search " name="show_hide" onclick="ShowHideFindControl();" style="background-color: #C4E1FF; color: #000080; border-style: solid"></b>
<p align="left"><font color="#003366" face="ISOCT" size="2">M.S. Shuman
Kibria{kibria14829@itc.nl} Msc. Student,Utrecht University, December, 2006 </font><font color="#003366" face="Courier New"> </font>
<br>
<br>
</body>
</html>

