[Chameleon] Can LegendTemplate keep legend-unvisible layers
map-visible after update?
Davelaar, Hilbert
Hilbert.Davelaar at wur.nl
Tue Aug 30 03:57:11 EDT 2005
Hi all,
I have a problem with the LegendTemplate-widget. In my mapfile I have three groups of layers. When starting the application I want the user to be able to turn on the layers contained in the 'Bestemmingen'-group. So only the layers in from this group are shown with a checkbox in the legend. Therefore a use following code in my legend_template.html:
[leg_layer_html order=ascending opt_flag=15]
[if name=layer_group value="Bestemmingen"]
<tr bgcolor="#ffffff">
<td align="center" width=20><input type="checkbox" style="background-color:#AAFFBB" 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><span class="label">[leg_layer_name]</span></td>
</tr>
[/if]
[if name=wms_name oper=isset]
<td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[metadata name=WMS_TITLE]</span></a></td>
</tr>
[/if]
[/if]
Turn on the layers from the 'Bestemmingen'-group works fine this way, but the problem is after the update of the map the other to groups of layer which by default have status=ON are turned off. Is it possible to keep their status ON all the time?
Kind regards,
Hilbert Davelaar
More information about the Chameleon
mailing list