]> dev.renevier.net Git - syp.git/blob - openlayers/examples/notile.html
initial commit
[syp.git] / openlayers / examples / notile.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>OpenLayers: Single Tile</title>
4     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5     <link rel="stylesheet" href="style.css" type="text/css" />
6     <script src="../lib/OpenLayers.js"></script>
7     <script type="text/javascript">
8         var map;
9         function init(){
10             map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
11
12             var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled", 
13                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
14             old_ol_wms.addOptions({isBaseLayer: true});
15             
16             var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile", 
17                 "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, 
18                 { singleTile: true, ratio: 1 } );
19             new_ol_wms.addOptions({isBaseLayer: true});
20
21             map.addLayers([old_ol_wms, new_ol_wms]);
22             map.addControl(new OpenLayers.Control.LayerSwitcher());
23             map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
24         }
25     </script>
26   </head>
27   <body onload="init()">
28     <h1 id="title">Untiled Example</h1>
29     <p id="shortdesc">
30       Create an untiled WMS layer using the singleTile: true, option or the deprecated
31       WMS.Untiled layer.
32     </p>  
33     <div id="mapDiv" class="smallmap"></div>
34     <p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using 
35         a default ratio value of 1.5.
36     <p> The second layer is an OpenLayers.Layer.WMS layer with singleTile set
37         to true, and with a ratio of 1.    
38   </body>
39 </html>