]> dev.renevier.net Git - syp.git/blob - openlayers/examples/wfs.html
reset openlayers directory to its original state at the end of build.sh
[syp.git] / openlayers / examples / wfs.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
4     <link rel="stylesheet" href="style.css" type="text/css" />
5     <script src="../lib/OpenLayers.js"></script>
6     <script type="text/javascript">
7         var map, layer;
8
9         function init(){
10             OpenLayers.ProxyHost="/proxy/?url=";
11             map = new OpenLayers.Map('map');
12             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
13                 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
14             map.addLayer(layer);
15
16             layer = new OpenLayers.Layer.WFS( "Owl Survey",
17                 "http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
18                 {typename: "OWLS", maxfeatures: 10},
19                 { featureClass: OpenLayers.Feature.WFS});
20             map.addLayer(layer);
21             map.addControl(new OpenLayers.Control.LayerSwitcher());
22             map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
23         }
24     </script>
25   </head>
26   <body onload="init()">
27     <h1 id="title">WFS Points</h1>
28     <p id='shortdesc'>
29       Using a Layer.WFS with a featureClass, one can take in XML data
30       from a WFS class and display it any way you like.
31     </p>  
32     <div id="map" class="smallmap"></div>
33   </body>
34 </html>