Project

General

Profile

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', {maxResolution: 'auto'});
15

    
16
            var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS", 
17
                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
18
            ol_wms.isBaseLayer = true;
19
            map.addLayers([ol_wms]);
20
            map.addControl(new OpenLayers.Control.LayerSwitcher());
21
            map.setCenter(new OpenLayers.LonLat(0, 0), 0);
22
        }
23
        // -->
24
    </script>
25
  </head>
26
  <body onload="init()">
27
    <h1>OpenLayers Example</h1>
28
    <div id="map"></div>
29
  </body>
30
</html>
(19-19/35)