[Mapserver-users] setExpression difficulty
Nick Petersen-Bergeron
bergeron at zedxinc.com
Wed Oct 15 06:37:47 PDT 2003
Well, I'm migrating away from a static mapfile format that I used
previously with the same information that was contained in $key, and it
worked fine then.
Nick
At 09:20 AM 10/15/2003 -0400, Lowell Filak wrote:
>If you create a static mapfile, for testing purposes, using that
>expression do you get the correct result or does it still appear that
>the expression is not set?
>Lowell
>
>The following message was sent by Nick Petersen-Bergeron
><bergeron at zedxinc.com> on Wed, 15 Oct 2003 09:13:52 -0400.
>
> > Yup. It gets rid of the error, but I think it doesn't actually set the
> > expression.
> >
> > Nick
> >
> > At 09:02 AM 10/15/2003 -0400, Lowell Filak wrote:
> > >Have you already tried '$tempClass->setExpression("\"$key\"");' ?
> > >Lowell
> > >
> > >The following message was sent by Nick Petersen-Bergeron
> > ><bergeron at zedxinc.com> on Tue, 14 Oct 2003 14:16:06 -0400.
> > >
> > > > 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
> > > >
> > > > _______________________________________________
> > > > Mapserver-users mailing list
> > > > Mapserver-users at lists.gis.umn.edu
> > > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> >
More information about the MapServer-users
mailing list