NQUERY only creates one image?
Stephen Lime
steve.lime at dnr.state.mn.us
Wed Nov 1 19:41:46 PST 2000
A query map operates on a single set of results, which can contain many features. That set of results is used
to produce 1 map. If you really want to produce a map per feature then you can use the shape metrics (see the shpmid and shpext template substituitions) in
conjunction with additional calls to the mapserver. In
your query template template you would build a call to create an inset map with something like
<img src="/cgi-bin/mapserv?map=[map]&mapxy=
[shpmidx]+[shpmidy]&scale=250000[get_layers]>
If the query was cached you could add it to the mix to create a querymap (still with all features) but centered on a particular one. Lot's of possibilties here.
Steve
>>> "Matt.Wilkie" <Matt.Wilkie at gov.yk.ca> 11/01/00 16:07 PM >>>
Hi All,
I need some help understanding how NQUERY works, or more accurately,
diplaying the results of nquery. The problem is that all returned
records show the same image. Digging deeper I discovered that only
four images are being generated from the nquery: 1 legend, 1 reference,
1 scalebar, 1 regular map image. Is this a bug or am I doing something
wrong?
The query (parsed for easy reading):
http://199.247.173.116/cgi-bin/mapserv&\
mode=nquery&\
layer=Neatline&\
layer=Roads&\
layer=Watercourses&\
layer=Waterbodies&\
zoomdir=0&\
zoomsize=2&\
imgxy=299.5+299.5&\
imgext=333361.916427+668031.136000+365226.766573+699918.837000&\
map=/var/www/htdocs/maps/data/105d/105d11.map&\
savequery=true&\
mapext=shapes&\
img.x=516&img.y=122
Number of records returned: 12 (11 Roads, 1 Waterbody)
The resultant files:
-rw-r--r-- 1 1410 everyone 4848 Nov 1 13:54 \
105d11973115666208793.png
-rw-r--r-- 1 1410 everyone 221 Nov 1 13:54 \
15d11973115666208793.qy
-rw-r--r-- 1 1410 everyone 824 Nov 1 13:54 \
105d11leg973115666208793.png
-rw-r--r-- 1 1410 everyone 15773 Nov 1 13:54 \
105d11ref973115666208793.png
-rw-r--r-- 1 1410 everyone 420 Nov 1 13:54 \
105d11sb973115666208793.png
(BTW, is there anyway to get the cgi to return "/" instead
of "%2F"? It makes reading the commandline very difficult)
-matt
========================================
Matt Wilkie * GIS Technician * Yukon Renewable Resources GIS
http://renres.gov.yk.ca/pubs/rrgis/
More information about the MapServer-users
mailing list