[Chameleon] ungrouped layers and legendtemplate

Jacob Delfos jacob.delfos at maunsell.com
Wed Jun 1 20:22:50 EDT 2005


Ken-Ichi,

You can adjust your legend template to look for a metadata-value that you made up, and then it can use boolean logic to determine whether or not to show the layer in the legend. Have a look at http://lists.maptools.org/pipermail/chameleon/2004-October/001526.html

In short: if a layer has the same name as another layer, they will turn on and off at the same time, even if only one layer shows in the legend. That way you can emulate groups, while also having control of individual layers. In your case, I would add a layer to your mapfile, with "STATUS DEFAULT", and then use a metadata entry to prevent it from showing in the legend.

regards,

Jacob


-----Original Message-----
From: chameleon-bounces at lists.maptools.org [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Ken-ichi
Sent: 2 June 2005 06:03
To: chameleon at lists.maptools.org
Subject: [Chameleon] ungrouped layers and legendtemplate

Hi all.  I feel like this is a problem I have solved in the past but I 
just can't seem to figure it out: my layers in a map file are organized 
into GROUPs, and I have an HTML legend template that works fine with the 
LegendTemplate widget.  However, when I have a layer that isn't a part 
of a group, it disappears whenever the map is updated (update, zoom, 
pan, whatever).  I was hoping to use ungrouping layers as a way of 
hiding them from the legend while still displaying them on the map.  Is 
Chameleon actually looking to some list of layers generated by 
LegendTemplate when it draws an updated map?  Is there a better way to 
effectively "hide" some layers from the legend in Chameleon?

Thanks in advance.

-Ken-ichi
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, WA 6007
PO Box 81, WA 6902
Leederville 
Western Australia
ABN 20 093 846 925

Tel     + 61 8 9281 6185
Fax    + 61 8 9281 6297
jacob.delfos at maunsell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050602/310092ed/attachment.html


More information about the Chameleon mailing list