[mapserver-users] php mapscript 6.2.0 problem plotting TRANSFORM false rectobj

daryl herzmann akrherz at iastate.edu
Fri Jan 25 13:03:00 PST 2013


Hi,

The follow code worked for me with previous Mapserver releases, it 
currently does not with PHP mapscript 6.2.0 on RHEL6 64bit.  Any ideas 
what I may be doing wrong?  The result is a blank image and I expect to 
see a black rectangle!

--> rect.map

MAP

NAME base4326
STATUS ON
SIZE 640 480
EXTENT -104 37 -87 49
UNITS DD

CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
CONFIG "CPL_DEBUG" "ON"
DEBUG 5

LAYER
   NAME rect
   TYPE POLYGON
   TRANSFORM FALSE
   STATUS ON
   LABELCACHE FALSE
   CLASS
       COLOR 0 0 0
   END
END

END

---> rect.php

$map = ms_newMapObj('rect.map');

$img = $map->prepareImage();

$layer = $map->getLayerByName("rect");

$rect = ms_newRectObj();
$rect->setextent(100,100,200,200);
$rect->draw($map, $layer, $img, 0, "");

header("Content-type: image/png");
$img->saveImage('');

thanks,
daryl



More information about the MapServer-users mailing list