]> dev.renevier.net Git - syp.git/blob - openlayers/examples/mapserver.html
reset openlayers directory to its original state at the end of build.sh
[syp.git] / openlayers / examples / mapserver.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>MapServer Layer</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 = 5;
9         var lat = 40;
10         var zoom = 5;
11         var map, layer;
12
13         function init(){
14             map = new OpenLayers.Map( 'map' );
15             layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS", 
16                     "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'},
17                     {gutter: 15});
18             map.addLayer(layer);
19
20             map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
21             map.addControl( new OpenLayers.Control.LayerSwitcher() );
22         }
23         
24     </script>
25   </head>
26   <body onload="init()">
27     <div id="title">MapServer Layer</div>
28     <div id="tags"></div>
29     <div id="shortdesc">Shows MapServer Layer</div>
30     <div id="map" class="smallmap"></div>
31     <div id="docs">
32         This is an example of using a MapServer Layer with a gutter parameter.  The gutter parameter is used to try to limit the edge effects between tiles.
33     </div>
34   </body>
35 </html>