Pablo:
Before I got you reply which I'll try,,, I found and tried the following:

QUERY_LAYERS: map.layers[2].params.LAYERS,

But it didn't have the effect I wanted.....

What I really want is the pop up to show ONLY data for the active layer....
Right now it is show data for the active layer plus the layer(s) underneath
Is this possible?


On Fri, Feb 26, 2010 at 10:20 AM, pablo lopez <plabl...@gmail.com> wrote:

>
>
> Hi Joe, I think something like this shoul do it:
>
>        info = new OpenLayers.Control.
> WMSGetFeatureInfo({
>            url: 'http://tobagoborn.com:8080/geoserver/wms',
>            title: 'Identify features by clicking',
>            layers: [layer1, layer2,...],  <---Here you provide an array of
> layer objects. These are the layers you are querying
>            eventListeners: {
>                getfeatureinfo: function(event) {
>                    map.addPopup(new OpenLayers.Popup.FramedCloud(
>                        "chicken",
>                        map.getLonLatFromPixel(event.xy),
>                        null,
>                        event.text,
>                        null,
>                        true
>                    ));
>                }
>            }
>        });
>        map.addControl(info);
>        info.activate();
>
>
>
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to