diff --git a/lib/GeoExt/widgets/ZoomSlider.js b/lib/GeoExt/widgets/ZoomSlider.js index 55d5b607..fc7d791b 100644 --- a/lib/GeoExt/widgets/ZoomSlider.js +++ b/lib/GeoExt/widgets/ZoomSlider.js @@ -217,7 +217,7 @@ GeoExt.ZoomSlider = Ext.extend(Ext.slider.SingleSlider, { this.minValue = Math.max(minZoom, layer.minZoomLevel || 0); } if(this.initialConfig.maxValue === undefined) { - this.maxValue = layer.minZoomLevel == null ? + this.maxValue = layer.maxZoomLevel == null ? layer.numZoomLevels - 1 : layer.maxZoomLevel; } // reset the thumb value so it gets repositioned when we call update