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:
+12
-8
@@ -111,14 +111,18 @@ OpenLayers.Map.prototype = {
|
|||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
destroy:function() {
|
destroy:function() {
|
||||||
for(var i=0; i< this.layers.length; i++) {
|
if (this.layers != null) {
|
||||||
this.layers[i].destroy();
|
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.layers = null;
|
||||||
this.controls[i].destroy();
|
}
|
||||||
}
|
if (this.controls != null) {
|
||||||
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