[Chameleon] Legend Template Bug?
kenichi.ueda at gmail.com
Thu Jun 30 12:32:59 EDT 2005
I've had similar problems trying to hide layers from the legend. Check
out this thread:
and my own notes on the issue here:
On Jun 30, 2005, at 6:39 AM, Peter Kingsbury wrote:
> Hello all,
> When working on the legend for my map project, I have noted a strange
> behavior. Unfortunately, my limited experience with the scripting
> system does not allow me to determine if this is a bug, or if I am
> doing something I shouldn't be.
> I am working with the LegendTemplate widget in Chameleon, and have
> used the example code from legend_template.html and additional code to
> display grouped layers. I've pulled out everything and only added in
> basic code to display legend groups, and the behavior still presents
> itself. At the end of this email is my current code.
> The problem with adding the leg_group_html code in, is that upon
> zooming to a certain scale on my map, the layers which are not visible
> in the legend (yet are visible on the map), disappear! This seems to
> be a catch-22... I need to hide some layers from the legend, but if
> they are not given names or groups in the map file, the legend turns
> this "hidden" layer off!
> I'm uncertain if this is a behavioral problem with Chameleon, or some
> weirdness with the legend script, any ideas?
> - Peter
> ---- script ----
> <td colspan=3 bgcolor=#cccccc><b>[leg_group_name]</b></td>
> [leg_layer_html order_metadata=legend_order opt_flag=15]
> <input type=checkbox name="map_[leg_layer_name]_status"
> value=1 [if name=layer_status oper=eq value=2]CHECKED[/if]>
> <img src="[leg_icon width=20 height=18]" width="20"
> <span class="label">
> </tr >
> Chameleon mailing list
> Chameleon at lists.maptools.org
More information about the Chameleon