scale difference in 5.0?

Bart van den Eijnden bartvde at GMAIL.COM
Mon Sep 10 05:59:15 EDT 2007


Hi list,

I was surprised to get a different scale back in 5.0 than in 4.8. I tracked
it down to the following difference in mapscale.c:

4.8.4:
md = width/(resolution*msInchesPerUnit(units, center_y)); /* was (width-1)
*/

5.0:
md = (width-1)/(resolution*msInchesPerUnit(units, center_y)); /* remember,
we use a pixel-center to pixel-center extent, hence the width-1 */


But PHP/Mapscript's zoomscale function does not seem to deal correctly with
this new change:

from Chameleon's map_navigator:

        // call the zoomscale function
        echo $nScale;
        $this->oSession->oMap->zoomscale($nScale, $oPixelPos,
          $this->oSession->oMap->width, $this->oSession->oMap->height,
$oRect);
        echo '<br/>'.$this->moMapObject->oMap->scale;


will output:

4278<br/>4287.52783964

Best regards,
Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070910/dc1c7663/attachment.html


More information about the mapserver-users mailing list