[Users] Question on multiple filters for a LayerContainer control
Andrew Stewart
Andrew.Stewart at reddeer.ca
Wed Sep 1 16:49:36 CEST 2010
I am faily new to GeoExt and openlayers. What I am trying to do is add multiple filters to a layercontainer so that I can add multiple layers to each group. Not sure if this is the best way to do this but what I want to do is add all my Street Labels to a group called "Labels" I can add one no problem called Overview Streets with the following code, but I need to add additional layers like one called Quadrant Streets. When I try to modify the filter code to add additional names it doesn't work and I get javascript errors. Any help appreciated!
//Define Layer List Control - Tree Control for Legend Control
var layerList_Labels = new GeoExt.tree.LayerContainer({
text: 'Labels',
layerStore: mapPanel.layers,
leaf: false,
expanded: false,
loader: {
filter: function(record) {
return record.get("layer").name.indexOf("Overview Streets") !== -1 (need to add Quadrant Streets here also)
}
}
});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100901/25446520/attachment.htm
More information about the Users
mailing list