1
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
<head>
|
3
|
<style type="text/css">
|
4
|
#map {
|
5
|
width: 512px;
|
6
|
height: 512px;
|
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( "OpenLayers WMS",
|
17
|
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
|
18
|
|
19
|
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
|
20
|
"http://wms.jpl.nasa.gov/wms.cgi",
|
21
|
{layers: "modis,global_mosaic"});
|
22
|
|
23
|
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
|
24
|
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
|
25
|
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
|
26
|
"prov_bound,fedlimit,rail,road,popplace",
|
27
|
transparent: "true", format: "image/png" });
|
28
|
|
29
|
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
30
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
31
|
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
32
|
map.zoomToMaxExtent();
|
33
|
}
|
34
|
// -->
|
35
|
</script>
|
36
|
</head>
|
37
|
<body onload="init()">
|
38
|
<h1>OpenLayers Example</h1>
|
39
|
<div id="map"></div>
|
40
|
</body>
|
41
|
</html>
|