Adding a getMinZoom API method.

This can be used by zoom slider controls, e.g. the GeoExt.ZoomSlider. Note that adjustZoom now also respects the map's fractionalZoom setting.
This commit is contained in:
ahocevar
2012-06-13 21:37:59 +02:00
parent 7141d237d9
commit 032df4b90a
2 changed files with 38 additions and 19 deletions

View File

@@ -194,10 +194,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
_addZoomBar:function(centered) {
var imgLocation = OpenLayers.Util.getImageLocation("slider.png");
var id = this.id + "_" + this.map.id;
var minZoom = 0;
if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
minZoom = this.map.adjustZoom(0);
}
var minZoom = this.map.getMinZoom();
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
var slider = OpenLayers.Util.createAlphaImageDiv(id,
centered.add(-1, zoomsToEnd * this.zoomStopHeight),