diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index fbaaac77f6..3e9a151fdb 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -307,6 +307,8 @@ ol.control.ZoomSlider.prototype.handleSliderChange_ = function(e) { var map = this.getMap(), amountDragged = this.amountDragged_(e), res = this.resolutionForAmount_(amountDragged); + goog.asserts.assert(res >= this.minResolution_ && res <= this.maxResolution_, + 'calculated new resolution is in allowed bounds.'); if (res !== this.currentResolution_) { this.currentResolution_ = res; map.getView().setResolution(res);