[mapserver-users] About FILTER and FILTERITEM

Christy Nieman cnieman at dmsolutions.ca
Wed May 14 05:15:01 PDT 2014


You do not need to set both FILTERITEM and FILTER.  You can just set 
FILTER to an expression using as many attributes as you need. e.g. 
FILTER (( [POPULATION] < 500000 ) AND ("[DISPLAY]" == "1")). Just like 
you can have multiple attributes in a class EXPRESSION.

I think it's the section of the document that is key - the "MapServer 
Expressions" section talks about using FILTER and EXPRESSION in more 
complex logical expressions, where as the section you quoted is talking 
about basic string comparison.

Christy

On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:
> Hi,
>
>  From document page: http://mapserver.org/mapfile/expressions.html
> "To use a string comparison for filtering a LAYER, both FILTERITEM and FILTER must be set. FILTERITEM is set to the attribute name. FILTER is set to the value for comparison. The same rule applies to CLASSITEM in the LAYER object and EXPRESSION in the CLASS object."
>
> That would mean that only one attribute from the data can be used for building a filter. Is this true or just old information living in the document?
>
> -Jukka Rahkonen-
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list