MS CGI Map File issue 3.6 vs 4.4
David Fawcett
David.Fawcett at STATE.MN.US
Thu Jan 6 13:49:11 PST 2005
Jerod,
The method for querying a layer changed after version 3.6. Instead of
setting a layer filter, you pass 'qlayer', 'qstring', and optionally
'qitem' in the URL. There should be plenty of examples in the archive.
Take a look at:
http://mapserver.gis.umn.edu/doc40/cgi-reference.html#changes
And this: http://mapserver.gis.umn.edu/doc40/cgi-reference.html#qlayer
David.
David J. Fawcett
MN Office of Environmental Assistance
>>> Jerod Clabaugh <jclabaugh at MAC.COM> 1/6/2005 3:37:33 PM >>>
All:
I have a problem when switching from MapServer CGI v 3.6 to 4.4
In my old map system, I was using MS 3.6 CGI, I was able to query a
layer and it would only return results if values from the query
matched the values as specified in the CLASS section of the queried
layer or layers.
I decided to upgrade to MS 4.4 CGI. The same underlying code was
used between systems, I just switched out the CGI version. I
modified the overall map file where necessary as indicated in the
Migration Guide on the MapServer WIKI.
Everything seems to work as it used to until I begin querying.
In this example of the problem, the CLASSITEM of the 'mangrove' layer
is a column in the ecosystem shapefile that stores the codes for all
ecosystem types. Through the CLASS section of the layer, I specify
using the EXPRESSION which types to show/query that are only
"mangrove types".
This logic worked fine in 3.6, but now using 4.4, I get problematic
results. When I query the layer, I get results returned that are not
specified within the CLASS for that layer. I might get types of
tropical forest or desert types instead of mangrove types. These
data are also located in the CLASSITEM column of the same shapefile
BUT are NOT the mangrove types are specified as EXPRESSIONS in the
CLASS section of the Mangrove layer in the map file.
I include the map file for this 'mangrove' layer as an example. This
worked perfectly when querying in 3.6 but not in 4.4.
Does anyone have any ideas as to what is wrong with my map file that
may be causing this error.
-=- MAP FILE EXCERPT -=-
####### BEGIN MANGROVE LAYER
LAYER
NAME mangrove
TYPE POLYGON
DATA ecosys.shp
STATUS ON
MINSCALE 100000
TEMPLATE "mangrove.html"
HEADER "mangrove_header.html"
FOOTER "mangrove_footer.html"
TRANSPARENCY 85
CLASSITEM "unesco_code"
CLASS
NAME "Dwarf Mangrove Scrub"
EXPRESSION 'IA5b(1)(a)'
OUTLINECOLOR 128 128 128
COLOR 165 228 170
END
CLASS
NAME "Waterlogged Freshwater Mangrove Scrub"
EXPRESSION 'IA5b(1)(b)'
OUTLINECOLOR 128 128 128
COLOR 87 203 95
END
END
####### END MANGROVE LAYER
More information about the MapServer-users
mailing list