[Mapserver-users] html legend - strange behaviour
Möri Cédric
Cedric.Moeri at bd.so.ch
Wed Mar 24 07:31:36 PST 2004
Hi list!
as i'm still investigating about my msyyparse()-parse error (see older mails
below), I found a rather strange behaviour of the html legend:
I have layer with 5 classes like this:
CLASS
NAME "Ag"
EXPRESSION ([COLOR] = 4)
STYLE
SIZE 3
SYMBOL 7
COLOR 0 255 255
END
END
CLASS
NAME "Bh"
EXPRESSION ([COLOR] = 5)
STYLE
SIZE 3
SYMBOL 7
COLOR 100 0 255
END
END
CLASS
NAME "Cg"
EXPRESSION ([COLOR] = 40)
SIZE 3
SYMBOL 7
COLOR 255 140 0
END
CLASS
NAME "Dh"
EXPRESSION ([COLOR] = 1)
SIZE 3
SYMBOL 7
COLOR 255 50 0
END
CLASS
NAME "Passstrassen"
EXPRESSION ([COLOR] = 6)
SIZE 3
SYMBOL 'bahnlinie overlay'
#SYMBOL 7
COLOR 255 0 255
END
The map renders perfect. All the colors are assigned to the right lines. But
in the html legend the colors are wrong. Class Ag is light blue - correct,
then classes Bh to Dh are also light blue - wrong!. The class "Passstrassen"
is again correct.
If I switch to a "normal" gif legend, everything appears correct!
Here is also my legendtemplate:
[leg_class_html visibility_flag=15]
<tr valign="top">
<td><img src=[leg_icon]></td><td> [leg_class_name]</td>
</tr>
[/leg_class_html]
The same mapfile and legendtemplate worked fine in the 3.6.6-Mapserver
Version.
Anyone an idea, what is going on here? Is this the same issue as my suddenly
poping of msyyparse-error as an error in the expression parsing? Is it
something funky with my data?
Any hint would be appreciated!
best regards
Cédric
PS: Working with MapServer4.0.1/postgreSQL7.4.2/postgis0.8.1. The system is
running under Linux RH7.2
> -----Original Message-----
> From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
> Sent: Monday, March 22, 2004 5:38 PM
> To: Cedric.Moeri at bd.so.ch; mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] msyyparse() - parse error
>
>
> Hi there: Msyyparse() is the function that evaluates
> MapServer expressions. There
> are 3 possibilities:
>
> 1) There is an error in the expression you're using.
> 2) There is something funky in your data, that breaks an expression.
> 3) There is an error in the code itself.
>
> Although 1) and 3) are possible they seem unlikely. My guess
> is that there is an
> issue with certain data values and the expressions. One
> example would be
> data values containing embeded quotes. Let's say you had a place name
> called O'Reilly and where using an expression like:
>
> ('[placename]' = 'foo') which would become in the case of O'Reilly,
>
> ('O'Reilly' = 'foo') and this would cause a parse error.
>
> Could also happen with numeric fields that didn't contain
> numbers or are empty.
> We'd really need to see your mapfile to make the call.
>
> Steve
>
> >>> Möri Cédric <Cedric.Moeri at bd.so.ch> 3/22/2004 4:27:42 AM >>>
> Hello list!
>
> we recently upgraded our systems from
> MapServer3.6.6/postgreSQL7.2.4/postgis0.8.0 to
> MapServer4.0.1/postgreSQL7.4.2/postgis0.8.1. The system is
> running under
> Linux RH7.2.
>
> Now i'm reciving sometimes this strange error "msyyparse(): Expression
> parser error. parse error".
> (In the old version, everyting worked perfect!)
>
> I'm not able to reproduce this error regularly. Sometimes it
> triggers when
> i'm switching some layers on/off, sometimes it triggers when
> i'm just paning
> (same layer-set/same scale). Sometimes it triggers only one
> time, othertimes
> up to 60 times with still the same mapfile.
>
> I read from the archives that there might be some issue about
> the querrying
> in postgis but there is not much more.
>
> So I guess I'm stuck. Has anybody a hint for me in which
> direction to go on
> with my quest? May anybody explain what the msyyparse does,
> and when it is
> called?
>
> Any hint would be appreciated!
> If needed I would be glad to provide further information.
>
> best regards
> mit freundlichen Grüssen
>
> Cédric Möri
>
> ********************************************
> Kanton Solothurn
> Amt für Geoinformation
> Abt. SO!GIS Koordinationsstelle
> Rötihof
> 4509 Solothurn
> T: ++41 (0)32 627 2475
> Fax: ++41 (0)32 627 2214
> http://www.sogis.so.ch
> ********************************************
>
>
>
> _______________________________________________
> 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