You need to log in before you can comment on or make changes to this bug.
The scale used for the Scale widget always lags behind one zoom action. The problem is both in 2.0.1 as in 2.2 beta. Okay, finally tracked this one down with Paul's help. The problem was in UpdateMap.php (BuildHTMLOutputMapExtentsChanged function) with Mapscript not updating the $oMap->scale correctly, only after a call to draw() it would update but that's quite inefficient. So we ended up calculating the scale in PHP instead. $inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1, 4374754); $mnScale = (($oMap->extent->maxx-$oMap->extent->minx)*$oMap->resolution*$inchesPerUnit[$oMap->units])/($oMap->width); $szResult .= "<input type=\"hidden\" name=\"MAP_SCALE\" value=".$mnScale."> <br>\n";
I can do this for CVS head. But I don't know how to work in the 2.0 branch so if this needs to be backported, someone else should do it, or please explain to me how to fix stuff in 2.0.X with CVS.
Done in both 2.0 and 2.2. 2.2: revision 1.49 of UpdateMap.php 2.0: revision 1.46.2.1 of UpdateMap.php