[mapserver-users] differences in color of rendered point

Dylan Keon keon at nacse.org
Fri Oct 25 15:16:26 EDT 2002


Hi all,

I'm using PHP Mapscript to query a point layer and render a new 
(red-colored) point on top of the queried point.  It works ok if I 
define the highlighted point as a layer in the mapfile, and then call it 
from the PHP script.  However, I'm getting strange results if I define 
the point in PHP Mapscript instead of in the mapfile.  The point is 
rendered just fine, but the colors only appear in gray.  For example:

     $queryClass->set("color", $map->addColor(255,0,0));

This produces a gray point, when it should be red.  If I use 0,0,0 I get 
a black point, but anything else results in a 127,127,127 gray.  Even if 
I use something like 134,187,2 the rendered point is still 127,127,127.

Any ideas?  I can just use the mapfile-defined point, but I'd like to 
figure out what's going wrong with the Mapscript method.  Thanks.

Dylan

--------------------

Using PHP 4.1.2 as a CGI, with php_mapscript.so built from the 3.6.1 
release.  Rendered images are all PNG.

# mapserv -v
MapServer version 3.6.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ 
SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE




More information about the mapserver-users mailing list