Add nearmap overlay
[bus.git] / openlayers / examples / doubleSetCenter.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
    <head>
        <title>OpenLayers Double Set Center Example</title>
       
        <script src="../lib/OpenLayers.js"></script>
        <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
        <link rel="stylesheet" href="style.css" type="text/css" />
    </head>
    <body>
        <h1 id="title">Double Set Center Example</h1>
 
        <div id="tags"></div>
 
        <p id="shortdesc">
            Demonstrate the behavior of two calls to set the center after instatiating the layer object.
        </p>
 
        <div id="map" class="smallmap"></div>
    
        <script defer="defer" type="text/javascript">
            var map = new OpenLayers.Map('map');
            var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
            map.addLayer(wms);
            map.setCenter(new OpenLayers.LonLat(100,10));
            map.setCenter(new OpenLayers.LonLat(1,1));
        </script>
 
        <div id="docs"></div>
    </body>
</html>