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/OpenLayers.js"></script>
7 <script type="text/javascript">
11 map = new OpenLayers.Map('map');
12 var wms = new OpenLayers.Layer.WMS(
13 "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0",
17 var layer = new OpenLayers.Layer.Vector("GML", {
18 strategies: [new OpenLayers.Strategy.Fixed()],
19 protocol: new OpenLayers.Protocol.HTTP({
20 url: "gml/polygon.xml",
21 format: new OpenLayers.Format.GML()
25 map.addLayers([wms, layer]);
26 map.zoomToExtent(new OpenLayers.Bounds(
27 -3.92, 44.34, 4.87, 49.55
32 <body onload="init()">
33 <h1 id="title">Vector Behavior Example (Fixed/HTTP/GML)</h1>
35 Vector layer with a Fixed strategy, HTTP protocol, and GML format.
37 <div id="map" class="smallmap"></div>
39 The vector layer shown uses the Fixed strategy, the HTTP protocol,
41 The Fixed strategy is a simple strategy that fetches features once
42 and never re-requests new data.
43 The HTTP protocol makes requests using HTTP verbs. It should be
44 constructed with a url that corresponds to a collection of features
45 (a resource on some server).
46 The GML format is used to serialize features.