<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have an application using 2
LegendTemplates. </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><cwc2 type="LegendTemplate"
styleresource="TextButtons" embedded="true"
template="legend.html" PopupWidth="500"
PopupHeight="500" Toolbar="false" Status="false"
Menubar="false" Visible="true"
Image="icons/icon_legend.png" ImageTip="Display Legend"
LABEL="Legend" controlvisibility="false"/></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><cwc2 type="LegendTemplate"
styleresource="TextButtons" embedded="true"
template="rel_link_template.html" PopupWidth="500"
PopupHeight="500" Visible="true" ImageTip="Related
Links" LABEL="RelatedLinks" controlvisibility="false"/></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I change layers, the first LegendTemplate is updated
but the second is not updated.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Is it possible to trigger events to update more than one
LegendTemplate? Looking at the script generated I’m not
sure</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>function LegendTemplateWRegisterForEvent()</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>{</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> goCWCJSAPI.RegisterEvent(LAYER_STATUS_CHANGED, "LegendTemplateWLayersChanged");</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> goCWCJSAPI.RegisterEvent(LAYER_ORDER_CHANGED, "LegendTemplateWLayersChanged");</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> goCWCJSAPI.RegisterEvent(MAP_NEW_LAYER_ADDED, "LegendTemplateWLayersChanged");</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>}</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>/**</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> * LegendTemplateWLayersChanged</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> * called when the layers are changed(JSAPI)</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> */</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>function LegendTemplateWLayersChanged()</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>{</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> goCWCJSAPI.ProcessLegendTemplate(34);</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>}</span></font></pre>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>(where does 34 come from?)</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>thanks</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Brent</span></font></p>
</div>
</body>
</html>