#2300 closed defect (fixed)
PHP MapScript's zoomScale(): scale difference in 5.0?
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 release |
Component: | MapScript-PHP | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | assefa |
Description
Bart van den Eijnden wrote to mapserver-users:
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
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 17 years ago
I have raised a ticket about this: http://trac.osgeo.org/osgeo/ticket/128 Seems that there is no simple fix.
Note:
See TracTickets
for help on using tickets.
That's probably related to ticket #2166 (on which I was CC'd with the wrong user id). I'll have a look now.