dynamic expressions, column and operator

Gregor Mosheh stigmata_blackangel at YAHOO.COM
Tue Dec 21 15:33:58 EST 2004


I'm trying to work a search-and-highlight capability
into our mapfile. Using static classes and
expressions, I can get selected features to have
non-default coloring. Easy.

The examples I've seen of letting the user dynamically
enter data for an expression use only the value, but
I'll want to allow the user to supply the column and
an operator, also. e.g. "price, <=, 50000".
How can I make my mapfile handle this properly?

I've tried something like this:
EXRPRESSION ([%col%] %op% %val%)
but it has problems when no search has been performed
yet; if any of those 3 elements are missing it's an
invalid expression and it barfs. Any thoughts on how I
can "set a default" for these, or cause the expression
to be gracefully ignored if this happens?

Also, is it still true that expressions like this can
only be performed on shapefile layers?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



More information about the mapserver-users mailing list