[Mapserver-users] legendObj outlinecolor property does not exist?
Gerald Buckmaster
gbuckmaster at cox.net
Mon May 26 15:22:14 PDT 2003
Greetings,
In the process of learning how to code PHP/Mapscript applications, I ran
across a possible removal of a property from the legendObj class. My Linux
system consists of 2.4.21-0.13mdk, PHP Version 4.3.2RC3, and MapServer
version 4.0 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE.
When the code (offending portion remarked out) below is executed, nothing is
displayed and I get the following error in my Apache error_log: PHP Fatal
error: Property 'outlinecolor' does not exist in legend object.
$my_legend = $map->legend;
$my_legend->set(height, 80);
$my_legend->set(width, 160);
#$my_legend->set(outlinecolor, 1);
$my_legend->set(status, MS_EMBED);
$my_legend->set(position, MS_UL);
$my_legend->set(postlabelcache, MS_TRUE);
$map->drawLegend();
BTW, when the offending line (concerning outlinecolor) is remarked out, the
applications works perfectly.
According to DM Solutions documentation on Mapscript 3.6, located at:
http://www2.dmsolutions.ca/webtools/php_mapscript/php_mapscript_docs36.html
The property does exist as shown below:
legendObj Class
-----------
Constructor:
Instances of legendObj are always are always embedded inside the mapObj.
Members:
int height;
int width;
int keysizex;
int keysizey;
int keyspacingx;
int keyspacingy;
int outlinecolor; //Color of outline of box, -1 for no outline
int status; //MS_ON, MS_OFF, MS_EMBED
int position; //for embeded legends, MS_UL, MS_UC, ...
int transparent;
int interlace;
int postlabelcache; //MS_TRUE, MS_FALSE
labelObj label;
colorObj imagecolor;
string template
Did this property get dropped in the recent development, or did I miss
something in the build of of Mapserver 4.0 dev? More importantly, can I
duplicate the functionality of the outlinecolor property of legendObj with
other code?
Thanks,
Gerald
More information about the MapServer-users
mailing list