[Mapserver-users] setExpression difficulty
Nick Petersen-Bergeron
bergeron at zedxinc.com
Tue Oct 14 11:16:06 PDT 2003
I'm trying to dynamically create classes in a layer using Perl mapscript 3.6.
Here's my code:
foreach $key (sort keys %colors) {
my $tempClass = new classObj($soilLayer);
$tempClass->setExpression("$key");
$tempClass->{name} = $key;
$tempClass->{size}=5;
my $r = $colors{$key}{'R'};my $g = $colors{$key}{'G'};my
$b = $colors{$key}{'B'};
my $rgb = 0;
foreach $clr ($r,$g,$b) {
$rgb <<=8;
$rgb += $clr;
}
warn "$rgb\n";
$tempClass->{color} = $rgb;
}
$key is essentially the datum that I am looking to assign the different
shapes to different classes by. It is set up as the classitem in the
layer. Now, the problem is that when I try and use setExpression, I get
the following error:
getSymbol(): Symbol definition error. (083028):(237)
The first number(083028) is the piece of datum I'm passing in, $key. The
second is the last non-end line of the mapfile. Any ideas?
Nick Petersen-Bergeron
System Administrator
ZedX Inc.
369 Rolling Ridge Drive
Bellefonte, PA. 16823
More information about the MapServer-users
mailing list