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!