make sure clone() of a layer does not copy the reference in the 'map' property. that should always be null as a cloned layer will still need to be added to the map via map.addLayer()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@887 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -92,6 +92,10 @@ OpenLayers.Layer.prototype = {
|
||||
// catch any randomly tagged-on properties
|
||||
obj = OpenLayers.Util.applyDefaults(obj, this);
|
||||
|
||||
// a cloned layer should never have its map property set
|
||||
// because it has not been added to a map yet.
|
||||
obj.map = null;
|
||||
|
||||
return obj;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user