Legends not updating?

Peter Kingsbury peter.kingsbury at GMAIL.COM
Wed Aug 31 12:39:56 PDT 2005


Hello all,

Grief once again with my legends.

The symptom is that, if the Layer status in the .MAP file is set to OFF, 
the layer doesn't show up ... if set to ON, it shows up. This behavior 
so far is normal.

However, when checking/unchecking layers from the LegendTemplate widget, 
then clicking Update, the page refreshes, and all layers listed in the 
LegendTemplate become unchecked!

I've gone through the documentation numerous times, and I am unable to 
find anything that might be wrong with the code. I've also used the 
sample legend template HTML code, which results in much the same 
behavior. Not sure where to look at this point. Going to give it a go 
again tomorrow.

I've included the legend_template.html and widget code below.

Any insight is appreciated!

Best regards,
- Peter



---- legend_template.html ----
[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=layer_status value=
                     [if name=layer_status oper=eq value=1]on[/if]
                     [if name=layer_status oper=eq value=0]off[/if]>
        </td>
        <td>
            <img src="[leg_icon width=20 height=18]" width="20" height="18">
        </td>
        <td>
            <span class="label">
                [leg_layer_name]
            </span>
        </td>
    </tr >
[/leg_layer_html]
---- end legend_template.html ----

---- chameleon widget ----
    <cwc2
        type="LegendTemplate"
        visible="true"
        embedded="true"
        template="legend_template.html"
        popupstyleresource="TextButtons"
        popupwidth="500"
        popupheight="400"
        status="false"
        menubar="false"
        controlvisibility="false"
        />
---- end chameleon widget ----



More information about the MapServer-users mailing list