diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index 333a7a8d68..52fadd687a 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -229,13 +229,19 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { */ destroy: function() { if (this.strategies) { - for(var i=0, len=this.strategies.length; i} + */ + removeMap: function(map) { + if(this.strategies) { + var strategy, i, len; + for(i=0, len=this.strategies.length; i function test_initialize(t) { - t.plan(2); + t.plan(3); var options = {}; var protocol = new OpenLayers.Protocol(options); t.ok(protocol instanceof OpenLayers.Protocol, "new OpenLayers.Protocol returns object" ); t.eq(protocol.options, options, "constructor sets this.options"); + t.eq(protocol.autoDestroy, true, "constructor does not modify this.autoDestroy"); } function test_destroy(t) { diff --git a/tests/Strategy.html b/tests/Strategy.html index 4e16c3c30a..99521f6065 100644 --- a/tests/Strategy.html +++ b/tests/Strategy.html @@ -4,13 +4,16 @@