[mapserver-users] query expression
Michael D. Hass
hassm@msue.msu.edu
Tue, 30 Apr 2002 15:06:31 -0400
Hi All-
I am riffing on the "simple item/itemn query" by having the user
enter in a value (instead of using the select box) and providing
a result using the mapserv cgi. This works for single items (find
the township), but I'd like to expand to find all polygons greater
than the input value. <<Was there a find all lakes greater than X
demo at one point?>
Can I do this using Expression in Class or should I be using Filter?
Relevant part of map file below.
Thanks for any comments.
Mike
This finds one township based on name, no problem.
<fontfamily><param>Courier New</param>LAYER
NAME township
DATA township
STATUS DEFAULT
TYPE POLYGON
FILTERITEM "NAME"
FILTER "%name%"
CLASS
#COLOR 255 255 212
OUTLINECOLOR 0 0 0
TEMPLATE case1_template.html
END
END
**this expression to get polys with acreage
greater than value entered by user??
LAYER
NAME township
DATA township
STATUS DEFAULT
TYPE POLYGON
FILTERITEM "NAME"
FILTER "%name%"
CLASS
#COLOR 255 255 212
OUTLINECOLOR 0 0 0
EXPRESSION ("name" gt "[ACRES]")
TEMPLATE case1_template.html
END
END
</fontfamily>