[ka-Map-users] grouping layers

Daniel.Huber at ch2m.com Daniel.Huber at ch2m.com
Thu Oct 11 15:51:00 EDT 2007


> -----Original Message-----
> From: ka-map-users-bounces at lists.maptools.org 
> [mailto:ka-map-users-bounces at lists.maptools.org] On Behalf Of 
> Anna Kostikova
> Sent: Tuesday, October 09, 2007 10:45 AM
> To: ka-Map-users at lists.maptools.org
> Subject: [ka-Map-users] grouping layers
> 
> Hi all!
>  
> is there any way to do grouping on multilevels?
> let's say for example I have category "Nature" and another 
> category "Industry".
> There are three layers that go into Nature category and two 
> go into Indusry, and what I need is to turn off or on 
> simultaneously either first category or second, but also turn 
> off\on each layes separetly, and visualize them as a tree of layers.
> Is there any way to do this ?
>  
> Anna
> 

I needed a similar capability for a demo site I developed -- where
different layers were grouped under certain headings.  The way I
accomplished this was pretty painful, as it required that I modify the
code in "kaLegend.js" to read the hardcoded name for each layer and
place it in the appropriate grouping.  Definitely not the way to go.

You can see an example at:  http://www.mapriders.com/mapserver/

If I had to do it all over again, I would have established a new
METADATA tag as Paul S. mentioned that would allow for nesting of the
layers like you described.  As it was, I was in a hurry and took a
shortcut.


Hope this helps,


Daniel Huber




More information about the ka-Map-users mailing list