[Users] how to find a layer in layertree
Robert Buckley
robertdbuckley at yahoo.com
Tue Jan 18 18:09:22 CET 2011
Hi,
I am trying to write a function which checks to see if a layer is present in the
tree.
if the layer already exists in the tree (or map) is shouldn´t be loaded...
can anyone help?
var clonename = clone.get("layer").name
if (mapPanel.layers(clonename)) {
Ext.MessageBox.alert(null, "test");
}
else
{
mapPanel.layers.add(clone);
Ext.MessageBox.alert(null, clonename);
}
Cheers
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110118/683a10b4/attachment.htm
More information about the Users
mailing list