Project

General

Profile

1 3032 perry
<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( "Population Density 2000",
20
                "http://beta.sedac.ciesin.columbia.edu/mapserver/wms/gpw2000",
21
                {layers: "gpw"});
22
            var cie_wms = new OpenLayers.Layer.WMS( "Human Footprint",
23
                "http://beta.sedac.ciesin.columbia.edu/mapserver/wms/hfoot",
24
                {layers: "hfoot"});
25
26
            jpl_wms.setVisibility(false);
27
28
            map.addLayers([ol_wms, jpl_wms, cie_wms]);
29
            map.addControl(new OpenLayers.Control.LayerSwitcher());
30
            // map.setCenter(new OpenLayers.LonLat(0, 0), 0);
31
            map.zoomToMaxExtent();
32
        }
33
        // -->
34
    </script>
35
  </head>
36
  <body onload="init()">
37
    <h1>OpenLayers Example</h1>
38
    <div id="map"></div>
39
  </body>
40
</html>