[Mapbender-users] query/ id tool output

karsten vennemann karsten at terragis.net
Sat Mar 1 04:04:28 EST 2008


Hi ,

I am using the query tool with treeGDE (2) which allows me to get any layers
attributes returned from my any of the layers selected for query output in
the second checkbox from my mapserver wms's (configured in my mapserver
"click query" template) . So far that's really sweet!!!

Now this allows the user to query multiple layers at once returning
attributes from all queried layers. In my map server html query template I
have a table configured: if there are several featured retrieved from a
query on layers I was wondering if I somehow one could embed them into one
html table. Right now if only one spatial feature is retrieved by the query
I get one table in the output . If there are 2 I get two tables (with the
same structure) , with 3 features I get three tables . and so on.
My query template looks like this:

<html>
	<head>
	<title>Identify - Results</title>
	<link href="../../../../css/template.css" rel="stylesheet"
type="text/css">
	</head>
	<body>
<table class="summaryStats">
	<tr><td>Name</td><td>[NAME]</td></tr>
	<tr><td>Office</td><td>[OFFICENAM]</td></tr>
	<tr><td>Street</td><td>[STREET]</td></tr>
	<tr><td>City</td><td>[City]</td></tr>
	<tr><td>Zip</td><td>[ZIP]</td></tr>
	<tr><td>Suite</td><td>[SUITE]</td></tr>
</table>
</body>
</html>

Thus, I was wondering whether I somehow could enclose the query results in
html table tags -> thus I would get only one table even if there are 100
features found from one layer.
Right now I don't know how to tackle this, or where to output those
enclosing html tags ( I couyld for example get rid of the table tags in the
template and only keep the 
	<tr><td>Name</td><td>[NAME]</td></tr>
	<tr><td>Office</td><td>[OFFICENAM]</td></tr>
Tags and have the enclosing html table tags somewhere else. Any suggestions?

Karsten Vennemann
Terra GIS LTD
Seattle



More information about the Mapbender_users mailing list