[Chameleon] Legend Template Bug?

Ken-ichi 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:

http://lists.maptools.org/pipermail/chameleon/2005-June/thread.html#2394

and my own notes on the issue here:

http://www.pageofguh.org/technicality/488

-Ken-ichi

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?
>
> Cheers,
> - Peter
>
>
>
> ---- script ----
>
>
>
> [leg_group_html]
>    <tr>
>        <td colspan=3 bgcolor=#cccccc><b>[leg_group_name]</b></td>
>    </tr>
> [/leg_group_html]
>
> [leg_layer_html order_metadata=legend_order opt_flag=15]
>    <tr>
>        <td>
>            <input type=checkbox name="map_[leg_layer_name]_status" 
> value=1 [if name=layer_status oper=eq value=2]CHECKED[/if]>
>        </td>
>        <td>
>            <img src="[leg_icon width=20 height=18]" width="20" 
> height="20">
>        </td>
>        <td>
>            <span class="label">
>                [leg_layer_name]
>            </span>
>        </td>
>    </tr >
> [/leg_layer_html]
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>



More information about the Chameleon mailing list