Project

General

Profile

1 3032 perry
<html xmlns="http://www.w3.org/1999/xhtml">
2
  <head>
3
    <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
4
    <style type="text/css">
5
        #map {
6
            width: 800px;
7
            height: 475px;
8
            border: 1px solid black;
9
        }
10
    </style>
11
    <script src="../lib/OpenLayers.js"></script>
12
    <script type="text/javascript">
13
        <!--
14
        var lon = 50;
15
        var lat = 0;
16
        var zoom = 0;
17
        var map, layer;
18
19
        function init(){
20
21
            var options = {
22
//                            resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101],
23
//                            scales: [50000000, 10000000],
24
//                            maxResolution: 0.17578125,
25
//                            minResolution: 0.0439453125,
26
//                            maxScale: 10000000,
27
//                            minScale: 50000000,
28
                            minResolution: "auto",
29
                            minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
30
                            maxResolution: "auto",
31
                            maxExtent: new OpenLayers.Bounds(-180, -90, 90, 180),
32
//                            numZoomLevels: 5,
33
                            controls: [new OpenLayers.Control.MouseDefaults()]
34
                          };
35
36
            map = new OpenLayers.Map( $('map') , options);
37
38
            map.addControl(new OpenLayers.Control.PanZoomBar());
39
40
            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
41
                    "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
42
            map.addLayer(layer);
43
44
45
            map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
46
        }
47
48
        // -->
49
    </script>
50
  </head>
51
  <body onload="init()">
52
    <div id="map"></div>
53
  </body>
54
</html>