Ok figured it out, just had to modify the code to the following -
if (record.data.title == 'Monday')
return true;
And it only returns the layer marked Monday now.
_____________________________________________
From: Andrew Stewart
Sent: November 16, 2010 12:07 PM
To: [email protected]
Subject: Problem With GeoExt.tree.LayerContainer loader
I am having a slight issue. What happens if you have 2 layers with similar
names like one called Monday and the other called Monday Too. With my loader
code below both layers would show up in my layertree evne though I only want
the first one (Monday) to show, can it be modified so that it will match exact
names of layers only? Appreciate any advice.
loader:
{
filter: function(record)
{
var myarr = new Array();
myarr[0] = record.get("layer").name.indexOf("Monday");
if(myarr[0]==-1)
{
return false;
}
else
{
return true;
}
}
}
});
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users