Changeset 7253
- Timestamp:
- 05/22/08 10:56:19 (6 months ago)
- Files:
-
- sandbox/camptocamp/unhcr/examples/v2-bbox-wfs-gml.html (modified) (3 diffs)
- sandbox/camptocamp/unhcr/examples/v2-fixed-http-gml.html (modified) (3 diffs)
- sandbox/camptocamp/unhcr/examples/v2-fixed-wfs-gml.html (modified) (3 diffs)
- sandbox/camptocamp/unhcr/examples/v2-wfs-t.html (modified) (2 diffs)
- sandbox/camptocamp/unhcr/examples/vector2-wfs-t.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/vector2.html (modified) (3 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector.js (modified) (3 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector2.js (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/camptocamp/unhcr/examples/v2-bbox-wfs-gml.html
r7057 r7253 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 <title>OpenLayers Vector 2 Layer Example</title>3 <title>OpenLayers Vector Behavior Example</title> 4 4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 5 5 <style type="text/css"> … … 23 23 ); 24 24 25 var layer = new OpenLayers.Layer.Vector 2("GML", {25 var layer = new OpenLayers.Layer.Vector("GML", { 26 26 strategy: new OpenLayers.Strategy.BBOX(), 27 27 protocol: new OpenLayers.Protocol.WFS.v1_0_0({ … … 40 40 </head> 41 41 <body onload="init()"> 42 <h1 id="title">Vector 2 Layer Example</h1>42 <h1 id="title">Vector Behavior Example</h1> 43 43 <p id="shortdesc"> 44 44 Uses a new strategy, protocol, and format combination. sandbox/camptocamp/unhcr/examples/v2-fixed-http-gml.html
r6949 r7253 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 <title>OpenLayers Vector 2 Layer Example</title>3 <title>OpenLayers Vector Behavior Example</title> 4 4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 5 5 <style type="text/css"> … … 21 21 ); 22 22 23 var layer = new OpenLayers.Layer.Vector 2("GML", {23 var layer = new OpenLayers.Layer.Vector("GML", { 24 24 strategy: new OpenLayers.Strategy.Fixed(), 25 25 protocol: new OpenLayers.Protocol.HTTP({ … … 37 37 </head> 38 38 <body onload="init()"> 39 <h1 id="title">Vector 2 Layer Example</h1>39 <h1 id="title">Vector Behavior Example</h1> 40 40 <p id="shortdesc"> 41 41 Uses a new strategy, protocol, and format combination. sandbox/camptocamp/unhcr/examples/v2-fixed-wfs-gml.html
r7055 r7253 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 <title>OpenLayers Vector 2Layer Example</title>3 <title>OpenLayers Vector Behavior Layer Example</title> 4 4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 5 5 <style type="text/css"> … … 23 23 ); 24 24 25 var layer = new OpenLayers.Layer.Vector 2("GML", {25 var layer = new OpenLayers.Layer.Vector("GML", { 26 26 strategy: new OpenLayers.Strategy.Fixed(), 27 27 protocol: new OpenLayers.Protocol.WFS.v1_0_0({ … … 40 40 </head> 41 41 <body onload="init()"> 42 <h1 id="title">Vector 2Layer Example</h1>42 <h1 id="title">Vector Behavior Layer Example</h1> 43 43 <p id="shortdesc"> 44 44 Uses a new strategy, protocol, and format combination. sandbox/camptocamp/unhcr/examples/v2-wfs-t.html
r7237 r7253 22 22 23 23 /* 24 rlayer = new OpenLayers.Layer.Vector 2("GML", {24 rlayer = new OpenLayers.Layer.Vector("GML", { 25 25 strategy: new OpenLayers.Strategy.BBOX(), 26 26 protocol: new OpenLayers.Protocol.WFS.v1_0_0({ … … 42 42 saveStrategy = new OpenLayers.Strategy.Save(); 43 43 44 clayer = new OpenLayers.Layer.Vector 2("GML", {44 clayer = new OpenLayers.Layer.Vector("GML", { 45 45 strategies: [new OpenLayers.Strategy.BBOX(), 46 46 saveStrategy], sandbox/camptocamp/unhcr/examples/vector2-wfs-t.html
r7237 r7253 40 40 ); 41 41 42 wfs = new OpenLayers.Layer.Vector 2("Editable Features", {42 wfs = new OpenLayers.Layer.Vector("Editable Features", { 43 43 strategies: [new OpenLayers.Strategy.BBOX(), 44 44 new OpenLayers.Strategy.Save(), sandbox/camptocamp/unhcr/examples/vector2.html
r6919 r7253 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 <title>OpenLayers Vector 2 Layer Example</title>3 <title>OpenLayers Vector Behavior Example</title> 4 4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 5 5 <style type="text/css"> … … 21 21 ); 22 22 23 var layer = new OpenLayers.Layer.Vector 2("GML", {23 var layer = new OpenLayers.Layer.Vector("GML", { 24 24 strategy: new OpenLayers.Strategy.BBOX(), 25 25 protocol: new OpenLayers.Protocol.HTTP({ … … 37 37 </head> 38 38 <body onload="init()"> 39 <h1 id="title">Vector 2 Layer Example</h1>39 <h1 id="title">Vector Behavior Example</h1> 40 40 <p id="shortdesc"> 41 41 Uses a new strategy, protocol, and format combination. sandbox/camptocamp/unhcr/lib/OpenLayers.js
r7237 r7253 186 186 "OpenLayers/Layer/PointTrack.js", 187 187 "OpenLayers/Layer/GML.js", 188 "OpenLayers/Layer/Vector2.js",189 188 "OpenLayers/Strategy.js", 190 189 "OpenLayers/Strategy/BBOX.js", sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector.js
r7085 r7253 195 195 this.features = []; 196 196 this.selectedFeatures = []; 197 198 // assumes if layer has strategy and protocol, then it has a format 199 if(this.strategy){ 200 this.strategy.setLayer(this); 201 } 202 if(this.strategies){ 203 for(var i = 0; i < this.strategies.length; i++){ 204 this.strategies[i].setLayer(this); 205 } 206 } 207 if(this.protocol) { 208 this.protocol.layer = this; 209 this.protocol.setFormat(this.format); 210 } 197 211 }, 198 212 … … 211 225 this.geometryType = null; 212 226 this.drawn = null; 227 if (this.protocol) { 228 this.protocol.destroy(); 229 this.protocol = null; 230 } 231 if (this.stategies) { 232 for(var i = 0; i < this.strategies.length; i++){ 233 this.strategies[i].destroy(); 234 this.strategies[i] = null; 235 } 236 this.strategies = null; 237 } 238 if (this.strategy) { 239 this.strategy.destroy(); 240 this.strategy = null; 241 } 213 242 OpenLayers.Layer.prototype.destroy.apply(this, arguments); 214 243 }, … … 259 288 this.renderer.setSize(this.map.getSize()); 260 289 } 290 if(this.strategy) { 291 this.strategy.commit(); 292 this.strategy.update(); 293 } 294 if(this.strategies) { 295 for(var i = 0; i < this.strategies.length; i++){ 296 this.strategies[i].commit(); 297 this.strategies[i].update(); 298 } 299 } 261 300 }, 262 301
