I tried to add a title attribute to the slider in _addZoomBar function in the
PanZoomBar control yet the "this.map.getZoom()" always returns 0 there. This is
amazing since just a few lines above the getZomm() was already coded there.
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
var slider = OpenLayers.Util.createAlphaImageDiv(id,
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
new OpenLayers.Size(20,9),
imgLocation+"slider.png",
"absolute");
this.slider = slider;
var curZoom = this.map.getZoom();
this.slider.setAttribute ('title',OpenLayers.i18n("zoom")+" = "+curZoom);
The last 2 lines are my code. Does anybody know why I always get 0?
http://www.orpatec.ch/osm/tools/main.php
Wyo
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users