Dave, What does your result.html query template look like? Did you capitalize all the attribute names (as in "[ATT_NAME]")? If so, make them small caps for PostGIS tables--[att_name].
Also, here's another hint: Use the TOLERANCE keyword... http://mapserver.gis.umn.edu/docs/reference/mapfile/layer Or if you prefer a fancier mapfile reference, check http://umn.mapserver.ch/index_en.php Good luck! -Perry On Monday 27 March 2006 08:07, Dave Stone wrote: > I am having problems adapting the class-level query template technique in > Example 3.1 of the MapServer Tutorial. > > Essentially, I want to do as the tutorial example does, i.e. be able to > click on a point feature on the map, and have a query template open up and > display attributes for the point. > > The only significant difference between my setup and the example's (that I > can see) is that the example queries a layer (cities) whose data source is > a shapefile containing polygons, whereas my source is points in a PostGIS > view (dedloc). The .map file segment for the layer is: > > LAYER # query layer using the dedloc PostgreSQL view > CONNECTIONTYPE postgis > NAME saint_dedications > CONNECTION "user=erdb13 dbname=stdraft" > DATA "geom from dedloc USING UNIQUE dr USING SRID=27700" > STATUS DEFAULT > DEBUG ON > TYPE POINT > FILTERITEM dedicationtype > FILTER "dedicationtype='%dtype%'" > TOLERANCE 5 > CLASS > NAME "Dedications" > MINSCALE 2000000 > TEMPLATE "result.html" > STYLE > SYMBOL "circle" > SIZE 5 > COLOR 255 0 0 > OUTLINECOLOR 0 0 0 > END > END > CLASS > MAXSCALE 1900000 > TEMPLATE "result.html" > STYLE > SYMBOL "circle" > SIZE 10 > COLOR 255 0 0 > OUTLINECOLOR 0 0 0 > END > END > END # test query layer > > > and the URL invoking the query template is: > > http://drayton.ucs.ed.ac.uk/cgi-bin/mapserv?imgxy=300.0+300.0& > imgext=217114.636666+624099.796666+387452.636666+794437.796666& > map=%2Fvar%2Fwww%2Fhtml%2Fsaints%2Fdata%2Fparish%2Fuig.map& > savequery=true&mode=browse&img.x=320&img.y=271&zoomdir=0&zoomsize=4& > layer=parish_labels&layer=parish&layer=saint_dedications&mode=query& > dtype=Altar+dedication > > What I get when I click on a dot on the map displaying saint_dedications is > a web page headed 'MapServer Message', but then no message, no attributes > for the dot I clicked, nothing! > > Can anyone suggest what might be going wrong? The query template > (result.html) is very simple; like Example 3.1, it just displays > boilerplate HTML and attribute values for the dot that was clicked. -- Pericles S. Nacionales Conservation Biology Program University of Minnesota e-mail: [EMAIL PROTECTED]
