going crazy on setting the colors of my zip polygons via perl mapscript
Joseph Norris
sirronj at PACBELL.NET
Sat Nov 27 22:03:16 PST 2004
Group,
I have found several samples of setting the color of a polygon based upon
class that I come up with this:
$zip_expression =~ s/\|$//;
my $class = new mapscript::classObj($layerObj);
$class->setExpression("/$zip_expression/");
$class->{styles}->{color}->{red} = 255;
$class->{styles}->{color}->{green} = 153;
$class->{styles}->{color}->{blue} = 153;
$layerObj->draw($map, $img);
However - this is not working. I am getting the right zip codes but no
matter what I do I can not get my mapscript to set the color based upon the
expression. When I was build the map file via perl I could set these just
fine but now I would like to use the perl->mapscript interface to do this.
What is wrong with the above snippet?
Thanks.
#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
More information about the MapServer-users
mailing list