[Users] efficient way to group overlay layers in tree node

karsten vennemann karsten at terragis.net
Wed Mar 14 19:51:28 CET 2012


Thanks works now

>>> first of all, you shouldn't be using multiple layer stores, unless
your tree is not meant to be a tree representation of the layers of
your map.

I changed it back to just one layer store.  The baselayer filter below works
to get rid of base layers in that node. I did also successfully filter by
layer option when I set a group option on the layer e.g.

return record.get("layer").group == "Schutzgebiete";

(when the layer has under options this set:
group: "Schutzgebiete"

Karsten


>>> If you only want overlays, you can use a gx_overlaylayercontainer
instead of a gx_layercontainer. Or if you want to use a custom filter,
your filter function would be

filter: function(record) {
    return record.getLayer().isBaseLayer === false;
}

Hope this helps,
Andreas.



More information about the Users mailing list