Ticket #1823 (closed defect: fixed)
MapObj clone only clones first outputformat
| Reported by: | bartvde@… | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript-PHP | Version: | 4.8 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When cloning a MapObj which has multiple output formats, only the first output
format gets cloned and makes it into the resulting MapObj.
Test MAP file:
MAP
OUTPUTFORMAT
NAME gif
DRIVER "GD/GIF"
MIMETYPE "image/gif"
IMAGEMODE PC256
EXTENSION "gif"
END
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
END
END
PHP Script:
<?php
$oMap = ms_newmapobj('testoutputformat.map');
$oResultMap = $oMap->clone();
$oResultMap->save('/tmp/testoutputformat.map');
?>
Output MAP file (only upper part):
MAP
EXTENT -1 -1 -1 -1
IMAGECOLOR 255 255 255
IMAGETYPE gif
SIZE -1 -1
STATUS ON
UNITS METERS
NAME "MS"
OUTPUTFORMAT
NAME "gif"
MIMETYPE "image/gif"
DRIVER "GD/GIF"
EXTENSION "gif"
IMAGEMODE "PC256"
TRANSPARENT FALSE
END
LEGEND
IMAGECOLOR 255 255 255
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
SIZE MEDIUM
TYPE BITMAP
BUFFER 0
COLOR 0 0 0
FORCE FALSE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
POSITION LL
STATUS OFF
END
Change History
Note: See
TracTickets for help on using
tickets.
