[Mapserver-users] savequery

Richard Greenwood rich at greenwoodmap.com
Thu Jan 22 19:25:17 EST 2004


Richie Pierce wrote:

> Thanks for the reply.   I added <input type="hidden" name="queryfile"
> value="[queryfile]"> to my template html and it works for the first
> zoom.  But if I try and zoom more than once it gives me this error.
> 
> msLoadQuery(): Unable to access file.
> (C:\tmp\ms_tmp\DEMO10747979451748.qy)
> 
> There isn't a .qy file of that name. Any ideas?

Is C:\tmp\ms_tmp\ the directory where your images are being written? The 
.qy file should be getting written into the same directory as the images.

First, check that .qy file is written to that directory when 
savequery=true. If not, then I would guess there permission or path 
problems.

Second, if the .qy file is being created, check that it is getting 
passed to your page. One easy way is to temporarily change <input 
type="hidden" to type="text" so you can see it.

Third, if it looks correct on your page, watch that it is being passed 
back to mapserver in the queryfile=... Your browser will escape the ":" 
and "/", which is fine ("/" will look like "%2F").

If you are still having problems, provide the whole query string from 
your browser's address bar and the WEB section from your map file.

Rich

>>I have changed the CGI demo a little and created a simple map.  I have
> 
> a 
> 
>>search box and pass the qlayer, qitem, qstring to mapserver CGI to 
>>return a querymap.  Once the map is zoomed and the feature is 
>>highlighted how do I keep the feature highlighted even when I zoom or 
>>pan, or even turn on other layers for that matter.  I am passing 
>>savequery=true as a hidden var in my form but if I zoom out or refresh
> 
> 
>>the map the selection goes away.  
> 
> 
> When savequery is true, Mapserver will save the query to a file and pass
> 
> the saved file name back in: [queryfile]. Then you need to pass that 
> file name back to Mapserver as queryfile=(whatever_query_filname_was). 
> You may need to use some javascript to give the user some control.
> 


-- 
Richard Greenwood
www.greenwoodmap.com



More information about the mapserver-users mailing list