Changing map file parameters

bfischer at usgs.gov bfischer at usgs.gov
Wed Mar 22 11:09:58 EST 2000


Hello mapserv users,

I am trying to change map file parameters on the fly.  I understand I have
to use form variables, but there is not much documentation on how to use
them.  Here is what I am trying to do.  I have a polygon coverage of
watersheds.  The user selects a watershed by a mouse click.  From this I am
able to acess all the attributes from that polygon.  Now I want to use this
polygon's attributes to form a class expression and query expression on the
same polygon shapefile.   The output I need is a map with all the polygons
highlighted that got selected in the class expression.  Here is the HTML
code I am using, am I doing something wrong?  All it returns is the image
from the previous point query.  One problem I noticed is the [DOWNSTREAM],
[FROM_DON_], and [TO_DON_] get turned into the values of the polygon's
attributes that got selected from the mouse click.


 <form name="query_map" method="GET" action="/cgi-bin/mapserv.exe">
   <input type="hidden" name="map" value="[map]">
   <input type="hidden" name="imgext" value="[mapext]">
   <input type="hidden" name="map_layer_0_classitem" value="DOWNSTREAM">
   <input type="hidden" name="map_layer_0_class_expression" value
=(([DOWNSTREAM] ge [FROM_DON_]) and [DOWNSTREAM] le [TO_DON_]))">
   <input type="hidden" name="map_layer_0_class_color" value="255 255 0">
   <imput type="image" name="img" src="../watershed/temp_mapserv/[img]"
border="0">
   </form>

Does any onw have any suggestions?  Would this also be possible to do with
a URL instead of form variables?

Thanks,

Brian Fischer
bfischer at usgs.gov
USGS WRD
2280 Woodale Dr.
Mounds View, MN
(612) 783-3133





More information about the mapserver-users mailing list