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', { controls: [] });
15
16
            var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
17
                "http://labs.metacarta.com/wms/vmap0",
18
                {layers: 'basic'} );
19
20
            var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
21
                "http://wms.jpl.nasa.gov/wms.cgi",
22
                {layers: "modis,global_mosaic"});
23
24
            var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
25
                "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
26
                {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
27
                         "prov_bound,fedlimit,rail,road,popplace",
28
                 transparent: "true", format: "image/png" });
29
30
            jpl_wms.setVisibility(false);
31
            dm_wms.setVisibility(false);
32
33
            map.addLayers([ol_wms, jpl_wms, dm_wms]);
34
            map.addControl(new OpenLayers.Control.PanZoomBar());
35
            map.addControl(new OpenLayers.Control.MouseToolbar());
36
            map.addControl(new OpenLayers.Control.LayerSwitcher());
37
            map.addControl(new OpenLayers.Control.Permalink());
38
            map.addControl(new OpenLayers.Control.Permalink($('permalink')));
39
            if (!map.getCenter()) map.zoomToMaxExtent();
40
        }
41
        // -->
42
    </script>
43
  </head>
44
  <body onload="init()">
45
    <h1>OpenLayers Example</h1>
46
    <a style="float:right" href="" id="permalink">Permalink</a>
47
    <div id="map"></div>
48
  </body>
49
</html>