<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Maybe I could add my own question here...
<br>I'd like to try using REGEXPs in a mapfile to do the same thing. I
have a list of hospital facilities where I'm enumerating the total number
of beds. I want to render the data based on the number of beds. I tried
evaluating the number of TOTAL_BEDS, but can only get it to work as follows.
What I'd like to do is say something like:
<br>EXPRESSION/> 400/
<br>as opposed to
<br>EXPRESSION /[4-9][1-9][0-9]/
<br>Thanks,
<br>Kieran
<p>snippet follows...
<p><tt> CLASSITEM TOTAL_BEDS</tt>
<br><tt> CLASS</tt>
<br><tt> NAME 'Greater than 401 Beds'</tt>
<br><tt> SIZE 5</tt>
<br><tt> EXPRESSION /[4-9][1-9][0-9]/</tt>
<br><tt> COLOR 0 0 0</tt>
<br><tt> SYMBOL 1</tt>
<br><tt> END</tt><tt></tt>
<p><tt> CLASS</tt>
<br><tt> NAME '250-400 Beds'</tt>
<br><tt> SIZE 4</tt>
<br><tt> EXPRESSION /^[2-3][5-9][0-9]$|^3[0-9][0-9]$/</tt>
<br><tt> COLOR 0 0 255</tt>
<br><tt> SYMBOL 1</tt>
<br><tt> END # CLASS</tt>
<br>
<p>Stephen Lime wrote:
<blockquote TYPE=CITE>You can use dynamic expressions to do that. Let's
say you have a mapfile with
<br>a point layer called "mypoints" with a single class. You can set up
a select list
<br>to set the expression for that class:
<p> <select name="map_mypoints_class_expression" single>
<br> <option value="expression"> option 1</option>
<br> <option value="expression"> option 2</option>
<br> ...
<br> </select>
<p>The expressions can be any valid MapServer (i.e. string, logical or
regular)
<br>expression. Syntax of the expression is identical to that entered in
a map
<br>file.
<p>Steve
<p>Stephen Lime
<br>Internet Applications Analyst
<p>Minnesota DNR
<br>500 Lafayette Road
<br>St. Paul, MN 55155
<br>651-297-2937
<p>>>> <Alexspringer@aol.com> 02/03/01 05:06PM >>>
<br>Using the mapserver cgi, I have a point file in use. I would
like to add a
<br>select [drop down box] that has values for a filter to be applied to
one
<br>field in the point file dbf so that only those records with the field
value
<br>equal to that filter display. Does anyone have an example of
the .map and
<br>.htm that can demonstrate how this is implemented?
<p>Thank you.
<br> </blockquote>
</html>