Pablo:<br>Before I got you reply which I'll try,,, I found and tried the following:<br><br>QUERY_LAYERS: map.layers[2].params.LAYERS,<br><br>But it didn'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"><<a href="mailto:plablo09@gmail.com">plablo09@gmail.com</a>></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: '<a href="http://tobagoborn.com:8080/geoserver/wms" target="_blank">http://tobagoborn.com:8080/geoserver/wms</a>',<br>
title: 'Identify features by clicking',<br> layers: [layer1, layer2,...], <---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>
"chicken",<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>