diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 3e513cd697..23eca09e45 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -152,7 +152,11 @@ OpenLayers.Map.prototype = { this.layers = []; - if (!this.controls) { + if (this.controls) { + for(var i=0; i < this.controls.length; i++) { + this.addControl(this.controls[i]); + } + } else { this.controls = []; this.addControl(new OpenLayers.Control.MouseDefaults()); this.addControl(new OpenLayers.Control.PanZoom());