Ticket #596: mapDestroy.patch
| File mapDestroy.patch, 0.7 kB (added by euzuro, 2 years ago) |
|---|
-
lib/OpenLayers/Map.js
old new 243 243 this.unloadDestroy = null; 244 244 245 245 if (this.layers != null) { 246 for(var i=0; i< this.layers.length; i++) {246 while(this.layers.length) { 247 247 //pass 'false' to destroy so that map wont try to set a new 248 248 // baselayer after each baselayer is removed 249 this.layers[ i].destroy(false);249 this.layers[0].destroy(false); 250 250 } 251 251 this.layers = null; 252 252 }
