[Users] Problem With GeoExt.tree.LayerContainer loader

Andrew Stewart Andrew.Stewart at reddeer.ca
Tue Nov 16 20:06:58 CET 2010


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;
                }
            }
            }
        });





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101116/3433ea7c/attachment.htm 


More information about the Users mailing list