[mapserver-users] savequery and queryfile question

Watson, Megan MeganWatson at auslig.gov.au
Mon Feb 25 17:57:13 PST 2002


I'm wondering if someone can guide me in the right direction as to how to
use the queryfile and savequery cgi variables in Mapserver 3.5

Currently I am displaying the  query results in the main template using a
header and footer.  I would like to then display the query results along
with the map and some other info (logo and some text) in another page that
is laid out in a printable format.

I am at the point where i can open this new window and display the map, logo
etc but not the query results.

Reading through the documentation it looks like I should be able to do this
using the queryfile and savequery cgi variables but am not sure how they
work.  I've managed to set these variables to save the query and can see the
.qy file it creates but not sure what to do with it after that.

Here are extracts of my map file and  templates:

## map file  ##

NAME Scar
STATUS ON
INTERLACE ON
SIZE 380 380                           #size in pixels of image#
#UNITS dd #units of map coordinates#
EXTENT -4919749.993861 -4877184.442175 5080250.006139 5122815.557825
IMAGETYPE gif
SYMBOLSET "symbol/symbolsms35.sym"
#FONTSET
"/public/drivers/Hp1055/mscdrom/extras/en/ps105x/fonts/truetype/arial.ttf"
SHAPEPATH "/www/mapdata/data/"		#location of shapefiles
IMAGECOLOR 204 244 255  			#background colour of map
displayed
#LABELOVERLAP false

WEB
  HEADER "scar_header.htm"						
  TEMPLATE "scar_template.htm"  				
  FOOTER "scar_footer.htm"						
  IMAGEPATH "/www/cgi-data/wwwtest/tmp/" 		
  IMAGEURL "/cgi-data/tmp/" 					
  #LOG "dev.log"
  #MINSCALE 60000000							
  #MINSCALE   420000							
END

QUERYMAP  
  STATUS ON  
  STYLE HILITE  
  COLOR 255 255 0
  OUTLINECOLOR 255 255 255
 END
---------------------------

## template ##

<form method=GET action="/cgi-bin/mapserv" name="mapserv"
onsubmit="javascript:clearLayers();">
  <input type="hidden" name="imgext" value="[mapext]" >
  <input type="hidden" name="imgxy" value="">
  <input type="hidden" name="imgbox" value="-1 -1 -1 -1">
  <input type="hidden" name="map" value="[map]">
  <input type="hidden" name="savequery" value="true">
  <input type="hidden" name="queryfile" value="[queryfile]">
  <input type="hidden" name="rawminx" value="[rawminx]" >
  <input type="hidden" name="rawminy" value="[rawminy]" >
  <input type="hidden" name="rawmaxx" value="[rawmaxx]" >
  <input type="hidden" name="rawmaxy" value="[rawmaxy]" >

---------------------

in the template i have a button that calls a javascript to pop the new
window, and radio buttons that allow the user to browse or query (using
nquery)


thanks

Megan Watson
Web Developer
Geoscience Australia, National Mapping Division
ph: 02 6201 4298




More information about the MapServer-users mailing list