Opened 19 years ago
#1456 new defect
zoomrectangle switches to full extent sometimes
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-PHP | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Hallo! Today I analysed a bug with zoomrectangle: I have a map and I zoom in with a box. When the x-range of the imgbox exceeds a certain limit, the map is automatically zooming to full extent of the map. When I passed the same parameters to the cgi binary everything worked as I expected so this must be a bug in PHP mapscript. When I increased the map's maxscale the behaviour vanished but nevertheless I think that zoomrectangle should be fixed. I don't have time in the moment to dig deeper into the problem. As far as I found out, it has something to do with the relation between maxscale, extent and imgbox. Above you find some values which help perhaps to verify this bug. It would be nice if someone could confirm the bug. Many thanks, Silke My mapfile values: EXTENT 3052504 5250000 4148254 6099309 MAXSCALE 1.5e+06 # the buggy one MAXSCALE 1.5e+07 # the one which worked SIZE 660 500 The behaviour could be seen, when I zoomed in from full extent of the map and the range between xmin and xmax exceeded 160 px. PHP-Script to draw image. Please read comments. <?php // I tested with mapserver 4.6.0, 4.6.1 and nightly build dl("php_mapscript.so"); function drawimage($imgbox) { $map = ms_newMapObj("mymapfile.map"); $rect = ms_newrectObj(); $rect->setextent(3039835.06,5250000,4160922.94,6099309); $map->zoomrectangle($imgbox, 660, 500, $rect); $image = $map->draw(); $imageurl = $image->saveWebImage(); echo($imageurl); } $pixext = ms_newrectObj(); // showing the bug $pixext->setextent(210,190,383,290); drawimage($pixext); // zooming to correct extent $pixext->setextent(238,155,333,261); drawimage($pixext); ?>
Note:
See TracTickets
for help on using tickets.