<br><tt><font size=2>vendorParams</font></tt><font size=2 face="sans-serif">
works very well!</font>
<br><font size=2 face="sans-serif">Thanks very much</font>
<br><font size=2 face="sans-serif">Steve</font>
<br><font size=2 face="sans-serif"><br>
</font>
<p><font size=3>&nbsp; </font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>bartvde@osgis.nl@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">23/11/2009 01:56 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">&quot;Daniel Morissette&quot; &lt;dmorissette@mapgears.com&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">mapserver-users &lt;mapserver-users@lists.osgeo.org&gt;</font>
<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] WMSgetFeatureInfo
and variable substitution</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Daniel is right.<br>
<br>
Steve, I've opened up an OpenLayers bug [1]. In the meantime you can try<br>
and use vendorParams on the GetFeatureInfo control, but you need to update<br>
the property whenever your values change.<br>
<br>
Further discussion can best be done on the OL mailing list.<br>
<br>
[1] http://trac.openlayers.org/ticket/2358<br>
<br>
Best regards,<br>
Bart<br>
<br>
&gt; I saw your post on the openlayers list, and it seems from your<br>
&gt; description of the problem that the SEMCDC, RCC and ORDER params are<br>
&gt; included by OpenLayers in a GetMap request but it fails to include
them<br>
&gt; in the corresponding GetFeatureInfo request. If that's the case then<br>
&gt; that's an issue with OpenLayers, or with the way you configure your<br>
&gt; queryable layer in OL. I'm not fluent enough in OL personally to tell<br>
&gt; where the solution lies, but if the params are missing in the URL
then<br>
&gt; the problem is definitely on the client side and not on the server.<br>
&gt;<br>
&gt; Daniel<br>
&gt;<br>
&gt;<br>
&gt; Steve.Toutant@inspq.qc.ca wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt; I already posted this problem on openlayers list, but it might
be a<br>
&gt;&gt; mapserver issue.<br>
&gt;&gt;<br>
&gt;&gt; OpenLayers.Control.WMSGetFeatureInfo doesn't use the FILTER key
in my<br>
&gt;&gt; mapfile. This filter is define with variables like this:<br>
&gt;&gt; FILTER &quot;semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre
in (%ORDRE%)&quot;<br>
&gt;&gt; .<br>
&gt;&gt;<br>
&gt;&gt; The getMap request is succesfull but not the GetFeatureInfo request<br>
&gt;&gt;<br>
&gt;&gt; Here is the request GetFeatureInfo<br>
&gt;&gt; /cgi-bin/mapserv.exe?map=MYMAP<br>
&gt;&gt; service=WMS&amp;version=1.1.0&amp;request=GetFeatureInfo&amp;layers=ecoles&amp;query_layers=ecoles&amp;styles=&amp;bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&amp;srs=EPSG%3A900913&amp;feature_count=3000&amp;x=272&amp;y=457&amp;height=523&amp;width=1008&amp;info_format=text%2Fhtml<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Here is the response<br>
&gt;&gt; &lt;?xml version='1.0' encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot;
?&gt;<br>
&gt;&gt; &lt;!DOCTYPE ServiceExceptionReport SYSTEM<br>
&gt;&gt; &quot;http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd&quot;&gt;<br>
&gt;&gt; &lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;<br>
&gt;&gt; &lt;ServiceException&gt;<br>
&gt;&gt; prepare_database(): Query error. Error declaring cursor: ERROR:
&nbsp;syntax<br>
&gt;&gt; error at or near &amp;quot;%&amp;quot;<br>
&gt;&gt; LINE 1: ...:text from ecoles WHERE (semcdc in (%SEMCDC%) ...<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>
&gt;&gt; With query string: DECLARE mycursor BINARY CURSOR FOR SELECT<br>
&gt;&gt; &amp;quot;taux_abs&amp;quot;::text,&amp;quot;nouv&amp;quot;::text,asbinary(force_collection(force_2d(geom900913)),&amp;#39;NDR&amp;#39;),id::text<br>
&gt;&gt; from ecoles WHERE (semcdc in (%SEMCDC%) and rss in (%RSS%) and
ordre in<br>
&gt;&gt; (%ORDRE%)) and (geom900913 &amp;amp;&amp;amp; setSRID(<br>
&gt;&gt; &amp;#39;BOX3D(-8493071.07981319 5795761.22549582,-8480841.15528974<br>
&gt;&gt; 5807991.15001926)&amp;#39;::BOX3D,900913) )<br>
&gt;&gt;<br>
&gt;&gt; &lt;/ServiceException&gt;<br>
&gt;&gt; &lt;/ServiceExceptionReport&gt;<br>
&gt;&gt;<br>
&gt;&gt; In OL, I have a WMS layer define like this:<br>
&gt;&gt; new OpenLayers.Layer.WMS('ecoles',<br>
&gt;&gt; '.../cgi-bin/mapserv.exe?map=MYMAP',{layers: 'ecoles', transparent:<br>
&gt;&gt; &quot;true&quot;, format:&quot;image/gif&quot;, SEMCDC:thisCDC,
RSS: thisRSS, ORDRE:<br>
&gt;&gt; thisOrdre},{isBaseLayer: false, visibility:<br>
&gt;&gt; false,singleTile:true,transitionEffect: 'resize'});<br>
&gt;&gt;<br>
&gt;&gt; How should I query the layer?<br>
&gt;&gt; Thanks<br>
&gt;&gt; Steve<br>
&gt;&gt; /<br>
&gt;&gt; Steve Toutant, M. Sc./<br>
&gt;&gt; Analyste en géomatique<br>
&gt;&gt; Secteur environnement<br>
&gt;&gt; Direction de la santé environnementale et de la toxicologie<br>
&gt;&gt; Institut national de santé publique du Québec<br>
&gt;&gt; 945, avenue Wolfe<br>
&gt;&gt; Québec, Qc G1V 5B3<br>
&gt;&gt;<br>
&gt;&gt; Tél.: (418) 650-5115 #5281<br>
&gt;&gt; Fax.: (418) 654-3144_<br>
&gt;&gt; __steve.toutant@inspq.qc.ca_ &lt;mailto:steve.toutant@inspq.qc.ca&gt;_<br>
&gt;&gt; __http://www.inspq.qc.ca_ &lt;http://www.inspq.qc.ca/&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapserver-users mailing list<br>
&gt;&gt; mapserver-users@lists.osgeo.org<br>
&gt;&gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Daniel Morissette<br>
&gt; http://www.mapgears.com/<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; mapserver-users@lists.osgeo.org<br>
&gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
&gt;<br>
<br>
<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>