1
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
<head>
|
3
|
<style type="text/css">
|
4
|
#map {
|
5
|
width: 800px;
|
6
|
height: 475px;
|
7
|
border: 1px solid black;
|
8
|
}
|
9
|
</style>
|
10
|
<script src="../lib/OpenLayers.js"></script>
|
11
|
<script type="text/javascript">
|
12
|
<!--
|
13
|
function init(){
|
14
|
var map = new OpenLayers.Map('map');
|
15
|
|
16
|
var ol_wms = new OpenLayers.Layer.WMS( "World Map",
|
17
|
"http://labs.metacarta.com/wms/vmap0?",
|
18
|
{layers: 'basic'} );
|
19
|
|
20
|
var jpl_wms = new OpenLayers.Layer.KaMap( "Satellite",
|
21
|
"http://www.openlayers.org/world/index.php", {g: "satellite", map: "world"});
|
22
|
var dm_wms = new OpenLayers.Layer.WMS( "Canada",
|
23
|
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
|
24
|
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
|
25
|
"prov_bound,fedlimit,rail,road,popplace",
|
26
|
transparent: "true", format: "image/png" });
|
27
|
|
28
|
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
29
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
30
|
map.zoomToMaxExtent();
|
31
|
}
|
32
|
// -->
|
33
|
</script>
|
34
|
</head>
|
35
|
<body onload="init()">
|
36
|
<h1>OpenLayers Example</h1>
|
37
|
<div id="map"></div>
|
38
|
</body>
|
39
|
</html>
|