Calling map.destroy() twice previously an error in IE. Fixed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,14 +111,18 @@ OpenLayers.Map.prototype = {
|
||||
/**
|
||||
*/
|
||||
destroy:function() {
|
||||
for(var i=0; i< this.layers.length; i++) {
|
||||
this.layers[i].destroy();
|
||||
}
|
||||
this.layers = null;
|
||||
for(var i=0; i< this.controls.length; i++) {
|
||||
this.controls[i].destroy();
|
||||
}
|
||||
this.controls = null;
|
||||
if (this.layers != null) {
|
||||
for(var i=0; i< this.layers.length; i++) {
|
||||
this.layers[i].destroy();
|
||||
}
|
||||
this.layers = null;
|
||||
}
|
||||
if (this.controls != null) {
|
||||
for(var i=0; i< this.controls.length; i++) {
|
||||
this.controls[i].destroy();
|
||||
}
|
||||
this.controls = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user