Opened 19 years ago

Closed 19 years ago

#1156 closed defect (fixed)

PHP $map->save() function doesn't save style's offset values

Reported by: v@… Owned by: mapserverbugs
Priority: high Milestone: 4.6 release
Component: MapScript Version: 4.4
Severity: normal Keywords:
Cc: sgillies@…

Description

I'm not sure if it's a PHP-only issue, but right now I only have a test 
environment for PHP.

Problem is, I generate a mapfile with offsets in the styles, such as the one I 
attach, and then use $map->save() to save it to disk, the values for the 
styles' offset isn't recorded in the output mapfile.

My test code is:

<?php
dl("php_mapscript441.so");
$m = ms_newMapObj("/tmp/test-offset.map");
$i = $m->draw();
$u = $i->saveWebImage();
$m->save("/tmp/offset-doesnt-reflect-here.map");
echo "<img src=$u>";
exit;
?>

I'm using MS 4.4.1, haven't tested CVS yet.

Attachments (2)

test-offset.map (1.2 KB ) - added by v@… 19 years ago.
My test mapfile (replace paths and shapefile and symbols as needed)
mapfile_c.diff.txt (138 bytes ) - added by v@… 19 years ago.
patch for writeStyle() function in mapfile.c, which didn't write the offsets

Download all attachments as: .zip

Change History (6)

by v@…, 19 years ago

Attachment: test-offset.map added

My test mapfile (replace paths and shapefile and symbols as needed)

comment:1 by sgillies@…, 19 years ago

Cc: sgillies@… added
I'm pretty sure this is a problem with msSaveMap.  Maybe we can work out a way
to maintain msSaveMap and msCopyMap in parallel?

by v@…, 19 years ago

Attachment: mapfile_c.diff.txt added

patch for writeStyle() function in mapfile.c, which didn't write the offsets

comment:2 by v@…, 19 years ago

Component: MapScript-PHPMapScript
Hello,

Is there any hope for this fix (or any other that addresses this issue) to be 
included in the official releases of MapServer?

comment:3 by dmorissette, 19 years ago

Milestone: 4.6 release
Status: newassigned
Taking this one now. Sorry for not doing it sooner.

comment:4 by dmorissette, 19 years ago

Resolution: fixed
Status: assignedclosed
Fixed. Added writing of OFFSET in writeStyle() in both 4.5 dev and the 4.4
branch (will be in 4.4.3)
Note: See TracTickets for help on using tickets.