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
This commit is contained in:
euzuro
2006-05-18 04:51:59 +00:00
parent 2ad4e5dbb9
commit eb0d4cbd49

View File

@@ -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();
},
/**