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:
euzuro
2006-07-06 01:02:02 +00:00
parent 4182cc1955
commit 5debdb69ec
2 changed files with 13 additions and 2 deletions

View File

@@ -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;
},