<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
An issue exists in my chameleon-app where the layers will disappear
after updating the
map!<br>
<br>
An example of the first Update:<br>
- layers listed in legend will update properly (checked layers appear,
unchecked layers disappear)<br>
- layers not in legend whose STATUS value is DEFAULT will remain in the
map view area<br>
- remaining non-legend, STATUS=ON layers are removed from view<br>
<br>
And the second update (and beyond):<br>
- layers listed in legend continue to behave as expected<br>
- STATUS=DEFAULT layers not in legend are removed from view<br>
- STATUS=ON layers not in legend continue to remain hidden from view<br>
<br>
Here are some code examples of what I am using... The "always on"
rivers layer which stays put after the first Update,
but disappears after subsequent updates, and a normal
initially-invisible layer which the legend controls just fine:<br>
<br>
<small><tt><font color="#3333ff"> #----------------------------------<br>
<br>
LAYER<br>
GROUP "Base Layers"<br>
NAME "Rivers"<br>
TYPE POLYGON<br>
DATA rivers<br>
STATUS DEFAULT<br>
CLASS<br>
NAME "Rivers"<br>
COLOR 48 100 230<br>
OUTLINECOLOR 64 128 255<br>
END<br>
METADATA<br>
SHOWINLEGEND "no"<br>
END<br>
END<br>
<br>
LAYER<br>
GROUP "Sites"<br>
NAME "Sites"<br>
TYPE POINT<br>
DATA sites<br>
TOLERANCE 6<br>
STATUS OFF<br>
HEADER '../query/query_header.html'<br>
FOOTER '../query/query_footer.html'<br>
MAXSCALE 30000<br>
<br>
METADATA<br>
SHOWINLEGEND "yes"<br>
END<br>
<br>
CLASSITEM "sites"<br>
LABELITEM "sites"<br>
END<br>
<br>
#----------------------------------</font><br>
</tt></small><br>
The legend template layer section:<br>
<font color="#3333ff"><br>
<big><tt><small><small>[leg_layer_html order_metadata=legend_order
opt_flag=15]<br>
[if name=SHOWINLEGEND oper=eq value="yes"] <br>
<tr bgcolor="#ffffff"><br>
<td align="center" width=20><br>
<input type="checkbox" name="legendlayername[]"
value="[leg_layer_name]"<br>
[if name=layer_status oper=eq value=1]CHECKED[/if]<br>
[if name=layer_status oper=eq
value=2]CHECKED[/if]><br>
</td><br>
<br>
<td><br>
<img src="[leg_icon width=20 height=18]" width="20"
height="18"><br>
</td><br>
<br>
<br>
<td><br>
<span class="label">[leg_layer_name]</span><br>
</td><br>
</tr><br>
[/if]<br>
[/leg_layer_html]</small></small></tt></big></font><br>
<br>
And finally, the LegendTemplate widget:<br>
<br>
<font color="#3333ff"><small><tt> <cwc2 <br>
type="LegendTemplate" <br>
visible="true" <br>
embedded="true" <br>
template="legend_template.html" <br>
popupstyleresource="TextButtons" <br>
popupwidth="500" <br>
popupheight="400" <br>
status="false" <br>
menubar="false"<br>
/><br>
</tt></small></font><br>
<br>
Is this a circular catch-22 problem? Is there a way around this
behavior?<br>
<br>
Best regards,<br>
- Peter<br>
<br>
<br>
</body>
</html>