query result map

Yeewen Sat yeewen at petromap.com
Thu Jan 25 16:18:12 EST 2001


Hi,

I've implemented something similar to Case #3 in
http://maps.dnr.state.mn.us/mapserver_demos/tests/itemquery/test.html
but the user query by dragging a box with the mouse over a map to query
objects. I display a query result and result map in a popup window.

Anyway, I noticed this behaviour:

If I set the STATUS of the layer I'm querying on to be OFF, the result map
doesn't show up. If STATUS is set to DEFAULT, the result map shows up.

My problem is that I have to set the LAYER STATUS to OFF in order to be able
to turn layer on and off.

Does anyone has any idea on how to resolve this problem? ie to get both
(query result map and layer on/off) to work?

Here's my mapfile, ywseis.map, showing only the layer that I query on.
...
#
# Start of layer definitions
#
LAYER
  NAME ss1l
  TYPE LINE
  STATUS OFF
  DATA ss1l
  CLASSITEM 'ID'
  MAXSCALE 3000000
  CLASS
    EXPRESSION /.*/
    COLOR 230 0 0
    SYMBOL 0
  END
  CLASS
    EXPRESSION /xxx/
    COLOR 0 0 255
  END
  QUERY
    TEMPLATE "../www/lineinfo.html"
  END
  TOLERANCE 10
END
...



lineinfo.html
<font size+1><b>Layer: Seismic Lines</b></font><p>
<table cellpadding=5 cellspacing=2 border=0>
<tr
bgcolor=#CCCCCC><th>ID</th><th>SIZE</th><th>STYLE</th><th>COLOR</th><th>FILL
</th><th>PATTERN</th><th>ANGLE</th><th>TEXT</th><th>ATTR</th></tr>


<tr><td>[ID]</td><td>[SIZE]</td><td>[STYLE]</td><td>[COLOR]</td><td>[FILL]</
td><td>[PATTERN]</td><td>[ANGLE]</td><td>[TEXT]</td><td>[ATTR]</td></tr>
<td><img
src="/cgi-bin/mapserv?map=../map/ywseis.map&item=ID&value=[ID]&mode=itemquer
ymap&mapext=shapes" height="200" width="200"></td>

</table>
<p>

--
Yeewen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010125/2f534d64/attachment.html


More information about the mapserver-users mailing list