diff --git a/lib/OpenLayers/Marker/Box.js b/lib/OpenLayers/Marker/Box.js index 412c875cbd..8501439560 100644 --- a/lib/OpenLayers/Marker/Box.js +++ b/lib/OpenLayers/Marker/Box.js @@ -33,6 +33,17 @@ OpenLayers.Marker.Box.prototype = this.setBorder(borderColor, borderWidth); }, + /** + * + */ + destroy: function() { + + this.bounds = null; + this.div = null; + + OpenLayers.Marker.prototype.destroy.apply(this, arguments); + }, + /** Allow the user to change the box's color and border width * * @param {String} color Default is "red" diff --git a/tests/Marker/test_Box.html b/tests/Marker/test_Box.html new file mode 100644 index 0000000000..066cf4197e --- /dev/null +++ b/tests/Marker/test_Box.html @@ -0,0 +1,362 @@ + +
+ + + + + + + + + + + + + + + + diff --git a/tests/list-tests.html b/tests/list-tests.html index 3f8bb3fc58..5ef330d379 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -20,6 +20,7 @@