Queries

Peter Kingsbury peterkingsbury at ISTOP.COM
Thu Jun 23 23:37:22 EDT 2005


Hello Pericles and List,

I have gone over the provided attachments... they are certainly helpful. 
Many thanks!

One problem I am having, is that Chameleon does not seem to take into 
account the HEADER/FOOTER/TEMPLATE fields I place in the mapfile 
layers... it simply takes from the QueryResults.phtml file that comes 
with the server.

I've confirmed that the placement of the HEADER/FOOTER/TEMPLATE fields 
-do- help, as without them, I get empty query results each time.

Each time that the query results appear with the QueryResults.phtml file 
as a template, I get a table with the complete data set, which is good, 
but a little too much information for my purposes! The mapfile seems to 
ignore my custom .html templates.

Any ideas?

The search continues,
- Peter


Pericles S. Nacionales wrote:

> Peter,
>
> Check http://terrasip.gis.umn.edu/projects/tutorial/section3.html and 
> look at the map and template files for each example.  I'm currently in 
> the process of updating the tutorial and it will make more sense when 
> I'm done...  perhaps in the next two weeks.
>
> Anyway, to setup a non-spatial query in MapServer (generating maps is 
> a form of query too!) you need to define a query template in each 
> layer to be queried.  In addition, you might also want to define a 
> header and footer for each of the layer.  Attached you will find the 
> relevant template files and a mapfile.  Open the mapfile and have a 
> look at the layer named cities_poly and also the web object--that's 
> where all the query-related parameters are defined.
>
> As for the interface, I don't know about Chameleon but in the 
> MapServer CGI world you invoke queries by changing the mode to query 
> or nquery.  I suspect it would be the same thing with PHP/MapScript.
>
> Good luck!
> -Perry
>
>
> Peter Kingsbury wrote:
>
>> Hello list,
>>
>> I have been reading through various documentation for some time, on 
>> how to
>> accomplish simple queries with the data set I have, on the Chameleon 
>> site I
>> have in place.
>>
>> At this point, I am not sure which of the sites, documents, or 
>> manuals will
>> lead me to my goal; may I request a pointer to a useful document 
>> which will
>> describe how to setup the initial environment to enable querying?
>>
>> I apologize if this is vague, however I am just beginning to scratch the
>> surface, hence I am reading as much as I can on the subject!
>>
>> Much thanks,
>> - Peter
>>
>>



More information about the mapserver-users mailing list