Changeset 7650
- Timestamp:
- 07/31/08 21:27:35 (4 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/Vector.js (modified) (4 diffs)
- trunk/openlayers/lib/OpenLayers/Protocol.js (added)
- trunk/openlayers/lib/OpenLayers/Strategy.js (added)
- trunk/openlayers/tests/Protocol.html (added)
- trunk/openlayers/tests/Strategy.html (added)
- trunk/openlayers/tests/list-tests.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers.js
r7627 r7650 181 181 "OpenLayers/Renderer/VML.js", 182 182 "OpenLayers/Layer/Vector.js", 183 "OpenLayers/Strategy.js", 184 "OpenLayers/Protocol.js", 183 185 "OpenLayers/Layer/PointTrack.js", 184 186 "OpenLayers/Layer/GML.js", trunk/openlayers/lib/OpenLayers/Layer/Vector.js
r7627 r7650 126 126 */ 127 127 styleMap: null, 128 128 129 /** 130 * Property: strategies 131 * {Array(<OpenLayers.Strategy>})} Optional list of strategies for the layer. 132 */ 133 strategies: null, 134 135 /** 136 * Property: protocol 137 * {<OpenLayers.Protocol>} Optional protocol for the layer. 138 */ 139 protocol: null, 140 129 141 /** 130 142 * Property: renderers … … 195 207 this.features = []; 196 208 this.selectedFeatures = []; 209 210 // Allow for custom layer behavior 211 if(this.strategies){ 212 for(var i=0, len=this.strategies.length; i<len; i++) { 213 this.strategies[i].setLayer(this); 214 } 215 } 216 197 217 }, 198 218 … … 202 222 */ 203 223 destroy: function() { 224 if (this.stategies) { 225 for(var i=0, len=this.strategies.length; i<len; i++) { 226 this.strategies[i].destroy(); 227 } 228 this.strategies = null; 229 } 230 if (this.protocol) { 231 this.protocol.destroy(); 232 this.protocol = null; 233 } 204 234 this.destroyFeatures(); 205 235 this.features = null; … … 258 288 this.renderer.map = this.map; 259 289 this.renderer.setSize(this.map.getSize()); 290 } 291 if(this.strategies) { 292 for(var i=0, len=this.strategies.length; i<len; i++) { 293 this.strategies[i].activate(); 294 } 260 295 } 261 296 }, trunk/openlayers/tests/list-tests.html
r7644 r7650 111 111 <li>Popup/FramedCloud.html</li> 112 112 <li>Projection.html</li> 113 <li>Protocol.html</li> 113 114 <li>Renderer.html</li> 114 115 <li>Renderer/Elements.html</li> … … 118 119 <li>Request/XMLHttpRequest.html</li> 119 120 <li>Rule.html</li> 121 <li>Strategy.html</li> 120 122 <li>Style.html</li> 121 123 <li>StyleMap.html</li>
