<br><tt><font size=2>But the problem with what you ask is that when the
header is processed, <br>
there is no active data record yet. The header is global to the layer</font></tt>
<br><font size=2 face="sans-serif">OK, I got to find another solution</font>
<br>
<br><font size=2 face="sans-serif">The client I use is openlayers</font>
<br><font size=2 face="sans-serif">I configured this control OpenLayers.Control.WMSGetFeatureInfo</font>
<br><font size=2 face="sans-serif">So when I click on a province, this
query is launched</font>
<br>
<br><font size=2 face="sans-serif">/cgi-bin/mapserv.exe?map=PORTAL&amp;&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetFeatureInfo&amp;LAYERS=RSSavertissements&amp;QUERY_LAYERS=RSSavertissements&amp;STYLES=&amp;BBOX=-8882077.807097%2C5589075.535908%2C-6925289.883347%2C7545863.459658&amp;FEATURE_COUNT=10&amp;HEIGHT=400&amp;WIDTH=400&amp;FORMAT=image%2Fgif&amp;INFO_FORMAT=text%2Fhtml&amp;SRS=EPSG%3A900913&amp;X=333&amp;Y=277</font>
<br>
<br><font size=2 face="sans-serif">The text returned is defined by the
template that is why I though the solution would be on mapServer side.</font>
<br><font size=2 face="sans-serif">thanks</font>
<br><font size=2 face="sans-serif">steve</font>
<br>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Daniel Morissette &lt;dmorissette@mapgears.com&gt;@lists.osgeo.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : mapserver-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">07/04/2010 03:46 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">mapserver-users@lists.osgeo.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [mapserver-users] record element
in query header</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Steve.Toutant@inspq.qc.ca wrote:<br>
&gt; <br>
&gt; Thanks!<br>
&gt; Here is more details on what I need to do<br>
&gt; Suppose I have one layer which contains the province in canada and
their <br>
&gt; cities.<br>
&gt; When the user hover or click on a province, I want this information
in a <br>
&gt; popup or a div (the client is openlayers and I use <br>
&gt; OpenLayers.Control.WMSGetFeatureInfo)<br>
&gt; <br>
&gt; If the user click on the province of Quebec....<br>
&gt; There are 2000 cities in Quebec<br>
&gt; 1: city name 1<br>
&gt; 2: city name 2<br>
&gt; ...<br>
&gt; 2000: city name 2000<br>
&gt; <br>
&gt; So In this case I think a field name should be supported in a header
<br>
&gt; template<br>
&gt; <br>
<br>
<br>
But the problem with what you ask is that when the header is processed,
<br>
there is no active data record yet. The header is global to the layer,
<br>
not specific to any data record. If for instance, your query selected <br>
cities from three provinces, which data field value should show up in <br>
the header for [provincename]? Only the value corresponding to the first
<br>
record?<br>
<br>
You'd get something like:<br>
<br>
There are 2000 cities in Quebec<br>
1: city name 1 (Quebec)<br>
2: city name 2 (Ontario)<br>
3: city name 3 (Ontario)<br>
4: city name 4 (Ontario)<br>
2: city name 5 (New-Brunswick)<br>
...<br>
2000: city name 2000<br>
<br>
How do you ensure that your queries return results only from a single <br>
province at a time? The answer to this question may point us to the way
<br>
to solve your problem.<br>
<br>
Daniel<br>
-- <br>
Daniel Morissette<br>
http://www.mapgears.com/<br>
_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</font></tt>
<br>
<br>
<br>