[Users] Tree advice

Robert Buckley robertdbuckley at yahoo.com
Wed Aug 10 10:59:42 CEST 2011


Hi,

I want to know how to create a geoext layer tree....but the "right" way!

I have seen examples such as here in the Haiiti Map 
("http://hypercube.telascience.org/haiti/") where multiple stores are created to 
group the layers together and then add them as nodes to the tree root.

However, although this works, Mr Andreas Hocevar has written this regarding a 
similar topic regarding creating a hierarchical tree structure...."What you want 
is easy to do. Just get rid of the multiple layer stores. There are in fact many 
ways to do what you want. What I have done previously, for example, is to have 
layer nodes with a "group" field, and set the filter of the LayerLoader of each 
LayerContainer to only accept layer records that match a specific group name."

I take his word as gospel, and therefore would like to know (possibly with a few 
code examples if anyone has any) what is the best way to achieve a nested tree 
structure with Directories in Directories which contain layers such as in the 
following diagram


Root > BaselayersDir
>BaseLayer 1
>BaseLayer 2
        > Dir1
>Dir1:1
>Layer 1
>Layer 2
>Dir1:1
>Layer 1
>Layer 2
>Dir1:2
>Layer 1
>Layer 2
        > Dir2
>Dir2:1
>Layer 1
>Layer 2
>Dir2:1
>Layer 1
>Layer 2
>Dir2:2
>Layer 1
>Layer 2
        > Dir3
>Dir3:1
>Layer 1
>Layer 2
>Dir3:1
>Layer 1
>Layer 2
>Dir3:2
>Layer 1
>Layer 2


How many way can one achieve this then? and what is a good method and what is a 
bad one?




Thanks for any advice,

Rob 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110810/74cb0668/attachment.htm 


More information about the Users mailing list