Pablo:<br>Before I got you reply which I&#39;ll try,,, I found and tried the following:<br><br>QUERY_LAYERS: map.layers[2].params.LAYERS,<br><br>But it didn&#39;t have the effect I wanted.....<br><br>What I really want is the pop up to show ONLY data for the active layer....<br>
Right now it is show data for the active layer plus the layer(s) underneath<br>Is this possible?<br><br><br><div class="gmail_quote">On Fri, Feb 26, 2010 at 10:20 AM, pablo lopez <span dir="ltr">&lt;<a href="mailto:plablo09@gmail.com">plablo09@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div class="gmail_quote">Hi Joe, I think something like this shoul do it:<br><br>       info = new OpenLayers.Control.<div>
WMSGetFeatureInfo({<br>
            url: &#39;<a href="http://tobagoborn.com:8080/geoserver/wms" target="_blank">http://tobagoborn.com:8080/geoserver/wms</a>&#39;,<br>
            title: &#39;Identify features by clicking&#39;,<br>           layers: [layer1, layer2,...],  &lt;---Here you provide an array of layer objects. These are the layers you are querying<br>
            eventListeners: {<br>
                getfeatureinfo: function(event) {<br>
                    map.addPopup(new OpenLayers.Popup.FramedCloud(<br>
                        &quot;chicken&quot;,<br>
                        map.getLonLatFromPixel(event.xy),<br>
                        null,<br>
                        event.text,<br>
                        null,<br>
                        true<br>
                    ));<br>
                }<br>
            }<br>
        });<br>
        map.addControl(info);<br>
        info.activate();</div><br></div><br>
</blockquote></div><br>