1 <html xmlns="http://www.w3.org/1999/xhtml">
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">
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} );
19 layer = new OpenLayers.Layer.WMS( "1 buffer: OpenLayers WMS",
20 "http://labs.metacarta.com/wms/vmap0",
21 {layers: 'basic'}, {'buffer':1} );
23 layer = new OpenLayers.Layer.WMS( "4 buffer: OpenLayers WMS",
24 "http://labs.metacarta.com/wms/vmap0",
25 {layers: 'basic'}, {'buffer':4} );
27 map.addControl(new OpenLayers.Control.LayerSwitcher())
28 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
32 <body onload="init()">
33 <h1 id="title">Buffer Example</h1>
39 This example shows the use of the buffer layer option for any layer that inherits from OpenLayers.Layer.Grid.
42 <div id="map" class="smallmap"></div>
45 Use the buffer property to control how many tiles are included
46 outside the visible map area. Default is 2.