dynamic query
Stephen Lime
steve.lime at dnr.state.mn.us
Wed Oct 4 09:57:22 PDT 2000
You can change most mapserver parameters, including class expressions on the
fly using form variables. Syntax is terse you most likely you'd have to use some
javascript to format things. So for example to change a class you'd use syntax
like:
map_cities_class_0_expression=new expression
where
- map_cities_class_0_expression = form variable most like build with help of javascript
- new expression = expression that conforms to mapserver requirements for mapfiles
The alternative is to use mapscript. One nice alternative would allow CGI substitutions
in addition to attribute substitutions. In that case you might have a CGI var called 'pop1'
and then could write an expression like ([population] > [pop1]) where one comes from
the attribute table, the other from the user. I like that and will look into it, perhaps for 3.3.012.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Ricardo Wagner Martins <ricmar at pro.via-rs.com.br> 10/04/00 11:43AM >>>
Hi all,
How can I do a dynamic statement in a CLASS-object
in the map-file?
There seem to be only static values possible in use
with EXPRESSION like this one:
LAYER
NAME cities # the CGI-relation
...
CLASSITEM 'population' #something like this
CLASS
EXPRESSION ([POPULATION] > 10000)
....
COLOR #e.g. red
END
CLASS
EXPRESSION ([POPULATION > 50000)
...
COLOR # e.g. dark red
END
END
I wanted to use dynamic (CGI-input) values
instead of fixed values. How can I do it
here or is this just the wrong way to solve
a problem of dynamic input? Any help is
welcome and appreciated.
Ricardo Martins
PROCERGS
BRAZIL
More information about the MapServer-users
mailing list