[Users] Find name of the checked node

Robert Buckley robertdbuckley at yahoo.com
Tue Mar 13 10:51:49 CET 2012


Hi,

I am stuck trying to modify my WMSgetFeatureinfo popup.
I´m using the treenode radio plugin to construct a layer tree. When the node is checked the attributes are read into the popup, but the title is feature.id. Instead I would like to have the layer name as the title so I have to iterate through the tree and find the node which is currently checked...

my feeble attempt doesn´t work...

//Loop through each Group of Layers
for (var i=0; i<=(layerRoot.childNodes.length -1); i++)
{
//Check for base layer, if so do this differently
if (layerRoot.childNodes[i].checked == true)
{alert("test");
}
 }

can anyone offer a solution?

cheers,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120313/320c9288/attachment.htm 


More information about the Users mailing list