getting attributes and matching them
steve.lime at dnr.state.mn.us
Mon Nov 20 12:42:44 EST 2000
These type of XBASE operations are really best handled with MapScript
and the applicable .dbf extension. That being said you can do this using
ITEMQUERY query. There's an example that does exactly this in the test
These queries use a regular expression match. If all you want is a map you
can rewrite class expressions from the browser and achieve some pretty
the various HTML form values into valid MapServer expressions.
3.4 (no, there will not be a 3.3.012 and 3.4 will be the next release) will allow
you to use form element values directly in expressions in the MapFile. This option
exists FOR THE MAPSERV CGI ONLY. So, if you have a form variable called
"myarea" you can write a class expression like:
([AREA] > [myarea])
[AREA] is feature specific and [myarea] is user/form specific. This saves the step
of formating the expression on the client side.
Internet Applications Analyst
500 Lafayette Road
St. Paul, MN 55155
>>> Dennis Christopher <dennis at avenza.com> 11/15/00 08:04AM >>>
Having reviewed some of the map server examples that use queries,
(including a QUERYMAPOBJECT),
I am still unclear on whether the following is supposed to be doable in
map server and if so, how:
Suppose I have a dialog area in my html form and in it the user can
see the attributes for the (current) layer and can construct a string
like "<attribute name = X".
(AREA = 30976 e.g.) The user wants the feature/s of the map that
correspond to this drawn
highlighted when he clicks OK.
Is this doable in mapserver? how?
(BTW I have an example that gets the attribute names for layers out of
in the map file, so setting up the dialog area should be possible. I'm
not sure if there
is a more direct mapscript way to get the attribute names for a layer.)
Dennis Christopher (dennis at avenza.com)
Product Development Manager
Avenza Systems, Inc.
More information about the mapserver-users