[Chameleon] Legend template using group rather than layer

Delfos, Jacob jacob.delfos at maunsell.com
Wed May 19 03:07:11 EDT 2004


Hi All,

I've been tying to create a legend template which generates a legend with
tickboxes to turn layers on and off, but which shows groups as well. If a
layer is in a group, I don't want the invidividual layer to be shown at all.

At the moment I'm using a basic template which I think I got off the
mapserver website (pasted below).

I tried to modify it to show groups, but it doesn't seem to work. Can anyone
give me a hint?

Regards,

Jacob


----------------------------------------------------------------------------
-----------------------------------------------------------

[leg_layer_html order=ascending opt_flag=15]
[if name=CWC_TMP_LAYER oper=isnull]

  <tr bgcolor="#FFFFFF">
    <td align="center"><input type="checkbox" name="legendlayername[]"
value="[leg_layer_name]"
    [if name=layer_status oper=eq  value=1]CHECKED[/if]
    [if name=layer_status oper=eq value=2]CHECKED[/if]></td>
    [if name=wms_name oper=isnull]
    <td><a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font
face="Arial, Helvetica, sans-serif"
size="1">[leg_layer_name]</font></a></td>
  </tr>
    [/if]
    [if name=wms_name oper=isset]
    <td><a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font
face="Arial, Helvetica, sans-serif" size="1">[metadata
name=WMS_TITLE]</font></a></td>
  </tr>
    [/if]
[/if]
[/leg_layer_html]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20040519/68e3b502/attachment.htm


More information about the Chameleon mailing list