<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>No one has an idea?<br><br>best regards<br>Sarah<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;"></span></b><br></font><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);"><div>Hi list,<br><br>I have my overlays tree with checkbox and radiobutton. If I click a radiobutton (start a radiochange event to get information about feature) and click at my map than I get a response. If I change again radiobutton/layer than I get a response from new layer and from one before. <br><br>code of my tree panel:<br>
id: 'panel',<br> title: 'Menu',<br> region: "east",<br> split: true,<br>
width: 200, <br> maxSize: 400,<br> collapsible: true,<br> collapseMode: "mini",<br> margins: '0 0 0 5',<br> layout: 'accordion',<br> layoutConfig: { animate: true},<br> items:
[{<br> title: "Layer tree",<br> width: 200, <br> id: "treelayer",<br> margins: '5 0 5 5',<br> xtype: "treepanel", <br>
loader: new Ext.tree.TreeLoader({<br> applyLoader: false}),<br> root: { nodeType: "async",<br> children: [ <br>
{<br> nodeType: "gx_baselayercontainer", expanded: true<br> }, <br> {<br> nodeType: "gx_overlaylayercontainer",<br> expanded: true, <br>
loader: { baseAttrs: {radioGroup: "foo"}<br> } <br> } <br> ] <br>
}, listeners: {"radiochange": function(node){getAttributes(node);}<br> },<br> rootVisible: false<br> }<br><br>and my code to get information:<br><br>function getAttributes(node) {<br><br> var name = node.layer.name;<br> var qlayer= node.layer.params.LAYERS;<br> var opt = node.layer.options;<br><br> var bbox=
node.layer.map.getExtent().toBBOX();<br> var breite = node.layer.map.size.w;<br> var hoehe = node.layer.map.size.h;<br><br> map.events.register('click', map, function (e) {<br> var url = node.layer.getFullRequestString({<br> REQUEST: "GetFeatureInfo",<br> SERVICE: 'WMS',<br> VERSION: '1.0.0',<br>
LAYERS: [qlayer],<br> TYPENAME: [qlayer], <br> EXCEPTIONS: "application/vnd.ogc.se_xml",<br> BBOX:
bbox,<br> X: e.xy.x,<br> Y: e.xy.y,<br> BUFFER: 50, <br> INFO_FORMAT: 'text/plain', <br>
QUERY_LAYERS: [qlayer],<br> WIDTH: breite,<br> HEIGHT: hoehe});<br> OpenLayers.loadURL(url, '', this, setHTML);<br> OpenLayers.Event.stop(e);<br> });<br> function setHTML(response) {<br> //doesn`t work:<br> //map.addPopup(new GeoExt.Popup({html: response.responseText, map: map})); <br> alert(response.responseText);<br>
OpenLayers.Util.getElement('south').innerHTML = ""; <br> };<br>};<br><br>It seems that qlayers and/or QUERY_LAYERS were not deleted (is an array) after one request. Removing brakets [] did not help.<br>Any hints or tips about that?<br>Thanks for any comment.<br><br>Best regards<br>Sarah<br><br></div>
</div><br></div></div>
</div></body></html>