diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 376118ce28..b2b3502848 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -12,7 +12,7 @@ ol.control.CONTROL_MAP = {}; * @param {Function} Control */ ol.control.addControl = function(name, Control) { - ol.control.CONTROL_MAP = Control; + ol.control.CONTROL_MAP[name] = Control; }; /** diff --git a/src/ol/control/Navigation.js b/src/ol/control/Navigation.js index 76bd899761..34edc79335 100644 --- a/src/ol/control/Navigation.js +++ b/src/ol/control/Navigation.js @@ -48,4 +48,4 @@ ol.control.Navigation.prototype.moveMap = function(evt) { this.getMap().moveByPx(evt.dx, evt.dy); }; -ol.control.addControl('navigation', ol.Control.Navigation); \ No newline at end of file +ol.control.addControl('navigation', ol.control.Navigation); \ No newline at end of file