[mapserver-users] query - nquery error w/ point query
Merrick Lex Berman
mberman at fas.harvard.edu
Wed Jun 26 10:59:15 PDT 2002
Hi,
Question about use of query / nquery in MS 3.3. (Note: I installed 3.6 and
got it to work with PNGs but not Mapplet, so went back to 3.3)
here is the test version:
http://chgis.fas.harvard.edu/webmap/cbos/
if we select the MODE query multi (ie name="mode" value="nquery") and click
over a CLUSTER of points, it will work fine.
however, if I ZOOM in at all, or try to click over a SINGLE point, it won't
work at all. I added a radio button selection for MODE query single (ie
name="mode" value="query") but it still doesn't work. Also played around
with TOLERANCE, but that didn't have any effect.
Heres the basic info:
TEMPLATE:
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="imgxy" value="249.5 199.5">
<input type="hidden" name="mapext" value="shapes">
<INPUT NAME="img" TYPE="image" SRC="[img]" width=500 height=400 border=0>
<input type="radio" name="mode" value="browse" checked> zoom<br>
<input type="radio" name="mode" value="query"> query single <br>
<input type="radio" name="mode" value="nquery"> query multi <p>
<input type=radio name=zoomdir value=1 [zoomdir_1_check]> Zoom
In<br>
<input type=radio name=zoomdir value=0 [zoomdir_0_check]> Pan <br>
<input type=radio name=zoomdir value=-1 [zoomdir_-1_check]> Zoom
Out<br>
<input type=text name=zoomsize size=1 value=[zoomsize]> Zoom
Factor<p>
MAP FILE (queried layer):
LAYER
NAME location
TYPE POINT
STATUS DEFAULT
DATA ctwn_loc
TOLERANCE 10
LABELITEM "UTF_NAME"
CLASS
COLOR 255 255 255
NAME "business"
SYMBOL symbols/pt_red_8.gif
SIZE 1
LABEL
COLOR 0 0 0
FONT simsun
TYPE TRUETYPE
SIZE 12
ANGLE AUTO
BUFFER 2
END # end of label
END
HEADER "loc_hdr.html"
FOOTER "loc_ftr.html"
QUERY
TEMPLATE "loc_fields.html"
END
END
In short, the nquery will only return results when there are MORE THAN ONE
points within the TOLERANCE distance, (or if the TOLERANCE = 0 if the point
SYMBOLS overlap).
I have the feeling that something is not set to capture the mouseclick
properly? Can anyone help me to straighten this out?
Thanks!
Lex Berman
China Historical Geographic Information System
http://fas.harvard.edu/~chgis
More information about the MapServer-users
mailing list