[mapserver-users] Usage of queryfile, savequery and searchmap.
nikos at maich.gr
nikos at maich.gr
Mon Nov 8 03:00:21 PST 2010
Hello,
I would like a bit of advice and clarification on ms querymaps,
queryfiles, savequery and the like...
In my current application I call cgi mapserver as ...
mapserv -nh > filename.html
This in turn generates my images as well as my main template in where
I then parse the main template only to extract a jason array (embedded in
html comments) and return it back to the ajax call
<!--MAPEXT
{
"img": "/IUNG/tmp/IUNG1288766057.gif",
"minx": "344809.441328",
"miny": "4334505.737472",
"maxx": "377000.191328",
"maxy": "4366696.487472",
"img": "/IUNG/tmp/IUNG1288766057.gif",
"ref": "/IUNG/tmp/IUNGref1288766057.gif",
"scalebar": "/IUNG/tmp/IUNGsb1288766057.gif",
"mode": "browse",
"fname": "/IUNG/tmp/IUNG1288766057.html",
"queryfile": "",
}
-->
I use this array to update my calling main template, so user is able to
pan/zoom
I believe this approach is a kludge, and I see that MS has facilities for
creating persistent maps generated from a query, which would then be used
further for pan/zoom operations, using savequery, queryfile searchmap and
the likes..
Could someone clarify the flow and usage of the above controls to be able
to create and use persistent maps from querying?
IIRC, one problem I had with my approach, when using .&queryfile=blah..."
was that I could not generate both a queryfile (to pass back) and a
normal, (main) template for parsing back by calling mapserv as above.
The html file created was huge, incorporating all the query templates into
it also...
regards
nikos
More information about the MapServer-users
mailing list