From fredj: "layer.destroy() calls removeLayer() so control.destroy()
should do the same by calling removeControl()". (Closes #1009) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -130,8 +130,12 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
// eliminate circular references
|
||||
if (this.handler) {
|
||||
this.handler.destroy();
|
||||
}
|
||||
this.map = null;
|
||||
this.handler = null;
|
||||
}
|
||||
if (this.map) {
|
||||
this.map.removeControl(this);
|
||||
this.map = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user