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:
@@ -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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user