]> dev.renevier.net Git - syp.git/blob - openlayers/examples/wfs-protocol.html
forbird creation or deletion of item; forbids adding or deleting an image
[syp.git] / openlayers / examples / wfs-protocol.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2     <head>
3         <title>OpenLayers Vector Behavior 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/Firebug/firebug.js"></script>
7         <script src="../lib/OpenLayers.js"></script>
8         <script type="text/javascript">
9             var map;
10         
11             function init() {
12                 OpenLayers.ProxyHost= "proxy.cgi?url=";
13                 map = new OpenLayers.Map('map');
14                 var wms = new OpenLayers.Layer.WMS(
15                     "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0",
16                     {layers: 'basic'}
17                 );
18
19                 var layer = new OpenLayers.Layer.Vector("WFS", {
20                     strategies: [new OpenLayers.Strategy.BBOX()],
21                     protocol: new OpenLayers.Protocol.WFS({
22                         url:  "http://demo.opengeo.org/geoserver/wfs",
23                         featureType: "tasmania_roads",
24                         featureNS: "http://www.openplans.org/topp"
25                     })
26                 });
27
28                 map.addLayers([wms, layer]);
29                 map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6);
30             }
31         </script>
32     </head>
33     <body onload="init()">
34         <h1 id="title">Vector Behavior Example</h1>
35         <p id="shortdesc">
36             Uses a BBOX strategy, WFS protocol, and GML format.
37         </p>
38         <div id="map" class="smallmap"></div>
39         <div id="docs">
40             <p>The vector layer shown uses the BBOX strategy, the WFS protocol,
41             and the GML format.  The BBOX strategy fetches features within a
42             bounding box.  When the map bounds invalidate the data bounds,
43             another request is triggered.  The WFS protocol gets features
44             through a WFS request.  The GML format is used to serialize
45             features.</p>
46         </div>
47     </body>
48 </html>