[mapserver-users] querymaps

Stephen Lime steve.lime at dnr.state.mn.us
Tue May 29 17:17:20 EDT 2001


> >>> Woody Wallace <wgwallace at students.wisc.edu> 05/21/01 05:14PM >>>
> Hi.

> I know this has been discussed before and may be changing in v3.5.
> However, I was wondering if someone could clarify the follow things I
> have noticed in the querymap and nquerymap modes of the mapserv cgi.

> 1) Are query items required in the layer definitions of the query layers?

No. A layer is queryable if it is:

  - ON, either explicitly via a form or has STATUS DEFAULT or QUERYONLY

and

  - has a QUERY object with a TEMPLATE defined.

> 2) Even though I specify mapext, a querymap request returns a map that
> appears to be related to mapxy and buffer values.  I suspect that it
> recenters the map to mapxy and sets the mapext to be mapxy +/- buffer.
> Is this the case?

It generates an extent based on the mapxy and buffer which take precedence
over the mapext.

> 3) Although querymap returns an image, nquerymap returns the following error:

> msSaveImage(): Unable to access file. (wliamap9904831364337.png)

> Why is this?  I would prefer that mapserv processes the image in memory
> and then pipes it right back to browser.  Is it trying to create a temp
> file?

Dunno, I'll check on it.

> 4) I have the same problem with multiple labels that another person on
> the list was having. I realize there is a work around.  However, I was
> wondering if this was a bug, or a problem with my .map file.  Could it
> be that I'm requesting that it be drawn twice?

What was the problem? I don't see how the two would be related.

> 5) Producing the image in querymap mode is significantly slower than map
> mode.  Obviously querying takes additional time, but it seems
> excessively slow for such a small layer (it contains a mere 10
> features).  Is there anyway I can improve performance?

I've not seen the performance hit. Usually queries are very fast and since
they are done fairly infrequently the extra time isn't noticable. Are you using
this in a pan/zoom context where the query map is also the main navigation
map? If so there is a way to cache query results so that the query need not
happen each time.

Here is the query I was using for the querymap request:

> http://144.92.235.164/cgi-bin/mapserv?mode=querymap&map=%2Fhome%2Fhttpd%2Fhtml%2Fof_mapserver%2Fwliamap.map&qlayer=seriesOutline&layer=seriesFilled&layer=hillshd&layer=great_lakes&layer=wi_water&layer=mcds&layer=dnrrail&layer=dnrrail2&layer=highways&layer=counties&layer=state&mapsize=460%20300&mapxy=564968+288907&buffer=10000

> Here is the url to my .map file:

> http://144.92.235.164/of_mapserver/wliamap.map 

> Thank you for your help.

> Woody Wallace
> Wisconsin State Cartographer's Office

Steve





Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937




More information about the mapserver-users mailing list