getFeatureInfo for the active Layer

16 views
Skip to first unread message

Emilio Otero

unread,
Jan 20, 2015, 10:31:10 AM1/20/15
to geoext-use...@googlegroups.com
Hi everyone,

how  can I get a getFeatureInfo for an active Layer? I use the GeoExt.plugins.TreeNodeRadioButton. This is my GetFeatureInfo:

infoControl = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'MyURL',
queryVisible:true,
maxFeatures: 50,
layers: [layer1, layer2, layer3, layer4],
});

infoControl.events.register("getfeatureinfo",this,showInfo);
mapPanel.map.addControl(infoControl);
infoControl.activate();
function showInfo(evt){
windowInfo.show();
$('MyDIV').innerHTML = evt.text;
}

When I click in the radioButton the layer is activated, but I recive the response from the visible layers.

For example, I have a Layer with all the information, I make diferents Postgress views with this Layer, if I make visible the diferents Layers in the view, and if I make active one layer, I recive the getFeatureInfo about two Layers (or more), and I want to recive about the active Layer.

How can I do it?

thanks!

Emilio Otero

unread,
Jan 23, 2015, 3:59:38 AM1/23/15
to geoext-use...@googlegroups.com
Solved!
Reply all
Reply to author
Forward
0 new messages