Hi the WMSGetFeatureInfo manage additionals parameters of the url of the GetFeatureInfo Request in  <i>vendorparams</i> attribute.<div>So try to add this to your code<div><br></div><div><div><b>var filter_param["cql_filter"] = prosjektnummer LIKE '%2008-25%' OR prosjektnavn LIKE '%2008-25%</b></div>
<div>info = new OpenLayers.Control.WMSGetFeatureInfo({</div><div>                   url: '<a href="http://kart.naturkart.no/geoserver/wms">http://kart.naturkart.no/geoserver/wms</a>',</div><div>                   title: 'Identify features by clicking',</div>
<div>                   queryVisible: true,</div><div>                   infoFormat:'application/vnd.ogc.gml',</div><div>                   <b>vendorParams:filter_param</b></div><div><span class="Apple-tab-span" style="white-space:pre">                    </span>eventListeners: {</div>
<div>                       getfeatureinfo: function(event) {</div><div>                           if (popup) {</div><div>                               map.removePopup(popup);</div><div>                           } ........................</div>
</div><div>I hope this is useful to you.</div><div>Regards</div><div>Nacho<br><div class="gmail_quote">On Thu, Jun 7, 2012 at 11:48 AM, Asle Benoni <span dir="ltr"><<a href="mailto:asle.benoni@gmail.com" target="_blank">asle.benoni@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have made this map: <a href="http://www.babkart.no" target="_blank">www.babkart.no</a><br>
<br>
I have a search box that on select of the results sends a refresh of<br>
the layer with CQL parameters to GeoServer. This works.<br>
But of course when I click I get popups of all the markers, even if<br>
they are hidden because I understand that I send a WMS request without<br>
any filter.<br>
<br>
So I need help how to use the generated CQL params in my WMS request<br>
for GetFeautureInfo to GeoServer.<br>
<br>
My function CQLfilter in app.js on line 1027 produces this link:<br>
prosjektnummer LIKE '%2008-25%' OR prosjektnavn LIKE '%2008-25%<br>
which I use to filter the map.<br>
<br>
The question is how I can use this (or IF I can use it!) in my<br>
function (line 907):<br>
<br>
info = new OpenLayers.Control.WMSGetFeatureInfo({<br>
                    url: '<a href="http://kart.naturkart.no/geoserver/wms" target="_blank">http://kart.naturkart.no/geoserver/wms</a>',<br>
                    title: 'Identify features by clicking',<br>
                    queryVisible: true,<br>
                    infoFormat:'application/vnd.ogc.gml',<br>
                    eventListeners: {<br>
                        getfeatureinfo: function(event) {<br>
                            if (popup) {<br>
                                map.removePopup(popup);<br>
                            } ........................<br>
<br>
Any ideas on how to use the CQL code here?<br>
<br>
~asle<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br></div></div>