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


_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to