Web application error

Pericles S. Nacionales naci0002 at UMN.EDU
Thu Mar 30 09:15:48 PST 2006


Dave,

Can you please post your mapfile or at least the object corresponding to 
the layer you're querying?  We can't answer your question without the 
details.

-Perry

Dave Stone wrote:
> Apologies for emailing direct -- LISTSERV keeps rejecting my posts as 
> duplicates.
> 
> No joy so far, I'm afraid, Perry. You were right about the PostGIS names 
> being upper-case, so I've
> changed them all to lower-case, and the result.html query template now 
> looks like this:
> 
> # query template
> <html>
> <head>
>  <title>MapServer - ItemQuery</title>
> </head>
> 
> <body bgcolor="#ffffff">
> 
> <font size="+2" face="arial,helvetica"><b>Case 1: Simple ItemQuery With 
> QueryMap</b></font>
> 
> <p>
> 
> This is just a simple dump of a few attributes for an individual location
> in the test suites parishes layer:
> 
> <p>
> 
> <b>Place Name:</b> [placename]<br>
> <b>Qualifying Name:</b> [qualifyingname]<br>
> <b>Location Type:</b> [locationtype]<br>
> <b>Grid Reference:</b> [locationgridref]<br>
> <b>Religious Order:</b> [religiousorder]<br>
> 
> <p>
> 
> and here's the map of the query results (you can zoom to a set of 
> results as well):
> 
> <p>
> </body>
> </html>
> 
> I had TOLERANCE set to 5 (pixels) for the PostGIS layer originally, and 
> tried upping it to 25 in
> hope that it would make it easier to 'hit the spot' when clicking on the 
> dots on the map. But no
> output -- just a blank page titled 'MapServer Message'.
> 
> I also tried setting DEBUG ON for the layer and class objects, but there 
> wasn't anything significant
> in the log file, just some map extent parameters.
> 
> Thanks for the pointer to the 'flashy' mapfile reference; there's some 
> useful examples in there.
> 
> Cheers,
> 
> Dave
> 
> ----- Original Message ----- From: "Pericles S. Nacionales" 
> <naci0002 at umn.edu>
> To: "Dave Stone" <D.Stone at ed.ac.uk>
> Cc: <MAPSERVER-USERS at lists.umn.edu>
> Sent: Monday, March 27, 2006 6:25 PM
> Subject: Re: [UMN_MAPSERVER-USERS] Web application error
> 
> 
>> 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: naci0002 at umn.edu
>>
> 
> 
> .
> 



More information about the MapServer-users mailing list