Pullups for 2.3:
svn merge svn.openlayers.org/trunk/openlayers/@2230 svn.openlayers.org/trunk/openlayers/@2233 svn.openlayers.org/branches/openlayers/2.3/ #480 Grid funkiness #491 improper URL encoding of LAYERS list in WMS GetMap request #500 layer.destroy() should remove itself from the map but not set new baselayer git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2234 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -137,10 +137,17 @@ OpenLayers.Layer.prototype = {
|
||||
/**
|
||||
* Destroy is a destructor: this is to alleviate cyclic references which
|
||||
* the Javascript garbage cleaner can not take care of on its own.
|
||||
*
|
||||
* @param {Boolean} setNewBaseLayer Should a new baselayer be selected when
|
||||
* this has been removed?
|
||||
* Default is true
|
||||
*/
|
||||
destroy: function() {
|
||||
destroy: function(setNewBaseLayer) {
|
||||
if (setNewBaseLayer == null) {
|
||||
setNewBaseLayer = true;
|
||||
}
|
||||
if (this.map != null) {
|
||||
this.map.removeLayer(this);
|
||||
this.map.removeLayer(this, setNewBaseLayer);
|
||||
}
|
||||
this.map = null;
|
||||
this.name = null;
|
||||
|
||||
Reference in New Issue
Block a user