put zoombar slider at the correct zoom level on first draw (not just always at the end)
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1306 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -77,9 +77,9 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation();
|
||||
|
||||
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
|
||||
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
|
||||
var slider = OpenLayers.Util.createAlphaImageDiv(id,
|
||||
centered.add(-1,
|
||||
(this.map.getNumZoomLevels()-1) * this.zoomStopHeight),
|
||||
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
|
||||
new OpenLayers.Size(20,9),
|
||||
imgLocation+"slider.png",
|
||||
"absolute");
|
||||
|
||||
Reference in New Issue
Block a user