1 <html xmlns="http://www.w3.org/1999/xhtml">
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">
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",
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"
28 map.addLayers([wms, layer]);
29 map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6);
33 <body onload="init()">
34 <h1 id="title">Vector Behavior Example</h1>
36 Uses a BBOX strategy, WFS protocol, and GML format.
38 <div id="map" class="smallmap"></div>
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