]> dev.renevier.net Git - syp.git/blob - openlayers/examples/buffer.html
move templates to a specific directory
[syp.git] / openlayers / examples / buffer.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2     <head>
3         <title>OpenLayers Buffer Example</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 lon = 0;
9             var lat = 0;
10             var zoom = 2;
11             var map, layer;
12
13             function init(){
14                 map = new OpenLayers.Map( 'map' );
15                 layer = new OpenLayers.Layer.WMS( "0 buffer: OpenLayers WMS",
16                         "http://labs.metacarta.com/wms/vmap0",
17                         {layers: 'basic'}, {'buffer':0} );
18                 map.addLayer(layer);
19                 layer = new OpenLayers.Layer.WMS( "1 buffer: OpenLayers WMS",
20                         "http://labs.metacarta.com/wms/vmap0",
21                         {layers: 'basic'}, {'buffer':1} );
22                 map.addLayer(layer);
23                 layer = new OpenLayers.Layer.WMS( "4 buffer: OpenLayers WMS",
24                         "http://labs.metacarta.com/wms/vmap0",
25                         {layers: 'basic'}, {'buffer':4} );
26                 map.addLayer(layer);
27                 map.addControl(new OpenLayers.Control.LayerSwitcher())
28                 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
29             }
30         </script>
31     </head>
32     <body onload="init()">
33         <h1 id="title">Buffer Example</h1>
34
35         <div id="tags">
36         </div>
37
38         <p id="shortdesc">
39             This example shows the use of the buffer layer option for any layer that inherits from OpenLayers.Layer.Grid.
40         </p>
41
42         <div id="map" class="smallmap"></div>
43
44         <div id="docs">
45             Use the buffer property to control how many tiles are included
46             outside the visible map area. Default is 2.
47         </div>
48     </body>
49 </html>