From eb0d4cbd49a063e67cc89f21f64f3084e7dd97b6 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 18 May 2006 04:51:59 +0000 Subject: [PATCH] we should always initialize objects in the class's constructor. otherwise, multiple instances of the class will share the same object. Thanks to Phil for finding this bug all over my code in the last version :-) git-svn-id: http://svn.openlayers.org/trunk/openlayers@125 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Marker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Marker.js b/lib/OpenLayers/Layer/Marker.js index cd859bd07a..6d366f39e9 100644 --- a/lib/OpenLayers/Layer/Marker.js +++ b/lib/OpenLayers/Layer/Marker.js @@ -7,7 +7,7 @@ OpenLayers.Layer.Marker.prototype = /** internal marker list * @type Array(OpenLayers.Marker) */ - markers: [], + markers: null, /** * @constructor @@ -16,6 +16,7 @@ OpenLayers.Layer.Marker.prototype = */ initialize: function(name) { OpenLayers.Layer.prototype.initialize.apply(this, arguments); + markers = new Array(); }, /**