[Chameleon] zoom clears legend

Ken-ichi kueda at wso.williams.edu
Thu Aug 5 12:52:58 EDT 2004


Hi folks.  I just started using Chameleon 1.99b2 and I'm very very 
excited about it.  I've been trying to adapt the very minimal tutorial 
in the documentation section of the web site, adding a few widgets to 
see how they work.  However, when I add the legendtemplate widget and I 
zoom in, all the layers get turned off, resulting in a blank map.  
Everything is fine when you first load the page, but when you zoom in or 
zoom out or update the map, the layers get cleared.  Can anyone explain 
this behavior?  This does not happen with any of the samples 
applications in the samples/ directory.  I found that if I set the 
legendtemplate_reset parameter in the URL to 0 the legend returns to 
normal with all the layers turned on (it's normally blank).  I've 
included my template file below if it'll be of any help.

Thanks in advance!

<html>
<head>
   <title>Widgets</title>
   <link href="cwc2.css" rel="stylesheet" type="text/css">
</head>

<body onload="CWC2OnLoadFunction()">

<form>

   <table>
   <tr>
       <td width="100">
           <table><cwc2 type="LegendTemplate" visible="true" 
embedded="true" template="vtm_legend_template.html" 
popupstyleresource="TextButtons" popupwidth="500" popupheight="400" 
status="false" menubar="false"/></table><br/>
           <cwc2 type="UpdateMap" visible="true" 
image="images/icon_update.gif" imagetip="update map" label="Update" 
imagewidth="24" imageheight="24">
               <image state="normal"/>
               <image state="selected"/>
               <image state="hover"/>
           </cwc2>
       </td>
       <td colspan="3" align="center">
           <CWC2 TYPE="MapDHTMLWidget" VISIBLE="true" width="400" 
height="300" AllowResize="true" MarqueeColor="#FF3333" MarqueeWidth="2" 
minscale="1"/>
       </td>
       <td valign="top">
           <CWC2 TYPE="ZoomIn" visible="true" 
Image="images/tool_zoomin_off.gif" 
ImageSelected="images/tool_zoomin_on.gif" 
ImageHover="images/tool_zoomin_over.gif" ImageTip="Zoom In" 
ImageWidth="24" ImageHeight="24" ToolSet="Navigation"/><br/>
            <CWC2 TYPE="ZoomOut" Visible="true" 
Image="images/tool_zoomout_off.gif" 
ImageSelected="images/tool_zoomout_on.gif" 
ImageHover="images/tool_zoomout_over.gif" ImageTip="Zoom Out" 
ImageWidth="24" ImageHeight="24" ToolSet="Navigation"/><br/>
            <CWC2 TYPE="PanMap" Visible="true" 
Image="images/tool_pan_off.gif" ImageSelected="images/tool_pan_on.gif" 
ImageHover="images/tool_pan_over.gif" ImageTip="Pan" ImageWidth="24" 
ImageHeight="24" ToolSet="Navigation"/>
   </tr>
   </table>

</form>

</body>

</html>


More information about the Chameleon mailing list