Queryfile and Savequery CGI Help

Richard Greenwood richard.greenwood at GMAIL.COM
Sat Jun 11 06:59:30 PDT 2005


From: David Stajan <dls <at> INFORMGIS.COM>
Subject: Re: [UMN_MAPSERVER-USERS] Queryfile and Savequery CGI Help
Newsgroups: gmane.comp.gis.mapserver.user
Date: 2005-06-10 16:25:29 GMT (21 hours and 10 minutes ago)

On Thu, 9 Jun 2005 12:36:40 +0000, Richard Greenwood
<richard.greenwood <at> GMAIL.COM> wrote:

>David <dls <at> INFORMGIS.COM> writes:
>
>>
>> Hi All,
>>
>> I'm trying to use CGI mapserver and have run into some confusion about
the
>> queryfile and savequery parameters.  The cgi reference manual says that
>> you can use the queryfile parameter within a Browse mode to have your
>> selection stay highlighted while you zoom/pan after performing the
initial
>> query.
>
>In your initial query, set savequery=true. This will save the in your temp
>directory with a unique (and rather long) name. Then on subsequent
queries set
>queryfile=/path/to/unique_long_name.qy
>
>An example is at:
>   http://www2.tetonwyo.org/mapserver
>Start out with a property search for 'smith' and then watch what happens
on the
>address bar.
>
>Rich

Thanks for the response Richard.  I have the queryfile working and it is
saving the the selected feature but the problem I'm having is that it's
returning the layer's query template when I pan or zoom after the initial
query.  What do I need to do to interact with the map after the query and
still have the selection higlighted on the map image(using the the
queryfile) but not trigger the query template to show up.  The
documentation suggests that using a Browse mode will just produce the map
image but thats not happening in my app.   Am I missing something?  I see
that it works well in your example.

Thanks,
DaviD


Well I guess you are missing something, but I'm having difficulty
envisioning just what it is.
When you do the query you set:  
   mode=itemnquery
   qlayer=x
   savequery=true
   etc....
Now you have a map and a saved query file. To pan or zoom, you want:
   mode=browse
   queryfile=name_of_query_file
   etc....

Do you have a template difined for the layer  that displays attribute
data? In many apps you want to be able to hilite the object (itemquery
or itemnquery) and you want to be able to click on the object and
display attribute data (query or nquery). I do that by basically
defining the layer twice with different names and different templates.

HTH

RIch

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the MapServer-users mailing list