[mapserver-users] Stunned by itemnquery, qstring etc.
Arlen Poort
arlen.poort at gmail.com
Fri Mar 11 09:10:25 PST 2011
Dear listers,
I have searched the archives through and through, but I can't get a working
solution. I am trying to build a url to query Mapserver. But whatever I try,
I always get the same result, which are the contents of my EMPTY template,
as defined in my mapfile.
The url I've built is this one, which I hoped to give me a list of all items
starting with 'R':
http://mapserver.nrc-handelsblad.com/cgi-bin/mapserv?
map=/var/www/fgs/chameleon/map/PS2011SB.map
&mode=itemnquery
&qlayer=Grootste2010
&qitem=Gemnaam
&qstring=/^R/
I've tried this one too, which I hoped would give me the item 'Rotterdam':
http://mapserver.nrc-handelsblad.com/cgi-bin/mapserv?
map=/var/www/fgs/chameleon/map/PS2011SB.map
&mode=itemquery
&qlayer=Grootste2010
&qstring=('Gemnaam'='Rotterdam')
I also tried escaped characters (%5b and %3d etc,), but every result is the
same: nothing.
Can anyone please help me? (Documentation below.)
Thanks!
Arlen
You can find the complete application (in Openlayers) here:
http://mapserver.nrc-handelsblad.com/PS2011SB.html
************************************************************************************************************
My mapfile looks like this:
MAP
NAME TK2010
STATUS ON
SIZE 458 542
SYMBOLSET ../etc/symbols.sym
EXTENT 13000 305000 279000 620000
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
WEB
IMAGEPATH "/var/www/fgs/chameleon/htdocs/tmp/"
IMAGEURL "tmp/"
LOG "/tmp/gmap.log"
EMPTY "http://mapserver.nrc-handelsblad.com/empty.html"
METADATA
"wms_feature_info_mime_type" "text/html"
"wms_title" "WMS NRC TK2010"
"wms_onlineresource" "
http://mapserver.nrc-handelsblad.com/cgi-bin/mapserv?"
"wms_srs" "EPSG:28992 EPSG:4326 EPSG:900913"
END
END
LEGEND
IMAGECOLOR 255 255 255
KEYSIZE 20 14
POSITION ul
LABEL
FONT sans
TYPE TRUETYPE
SIZE 8
OFFSET 0 -2
END
STATUS off
END
PROJECTION
"proj=longlat"
"ellps=WGS84"
"datum=WGS84"
"no_defs"
END
OUTPUTFORMAT
NAME "aggpng24"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
QUERYMAP
STATUS on
STYLE hilite
COLOR 255 255 0
SIZE 320 160
END
SYMBOL
NAME "Stembureau"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
LAYER
NAME "Grootste2010"
METADATA
"wms_feature_info_mime_type" "text/html"
"wms_title" "Grootste partij 2010"
"DESCRIPTION" "Verkiezingen TK2010"
"LAYER" "TK2010"
"qstring_validation_pattern" '.'
END
TYPE POINT
STATUS on
DATA "/var/www/fgs/chameleon/data/PS2011/PS2011stembureausDispWGS84.shp"
TOLERANCE 10
OPACITY 100
HEADER "PS2011SBheader.html"
TEMPLATE "PS2011SBquerytemplate.html"
FOOTER "PS2011SBfooter.html"
CLASS
STYLE
SYMBOL "Stembureau"
SIZE 9
COLOR 109 208 122
OUTLINECOLOR 52 162 67
END
MAXSCALEDENOM 5000000
END
END
*************************************************************************************************************
My querytemplate look like this:
<!-- MapServer Template -->
[ID]<BR>
[SBNR]<BR>
[GEMNR]<BR>
[Gemnaam]<BR>
[SBNAAM]<BR>
(etc.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110311/5f0c6a99/attachment.htm>
More information about the MapServer-users
mailing list