<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'>&nbsp;</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 &nbsp;2
LegendTemplates.&nbsp;&nbsp; </span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&lt;cwc2 type=&quot;LegendTemplate&quot;
styleresource=&quot;TextButtons&quot; embedded=&quot;true&quot;
template=&quot;legend.html&quot; PopupWidth=&quot;500&quot;
PopupHeight=&quot;500&quot; Toolbar=&quot;false&quot; Status=&quot;false&quot;
Menubar=&quot;false&quot; Visible=&quot;true&quot;
Image=&quot;icons/icon_legend.png&quot; ImageTip=&quot;Display Legend&quot;
LABEL=&quot;Legend&quot; controlvisibility=&quot;false&quot;/&gt;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&lt;cwc2 type=&quot;LegendTemplate&quot;
styleresource=&quot;TextButtons&quot; embedded=&quot;true&quot;
template=&quot;rel_link_template.html&quot; PopupWidth=&quot;500&quot;
PopupHeight=&quot;500&quot;&nbsp; Visible=&quot;true&quot;&nbsp; ImageTip=&quot;Related
Links&quot; LABEL=&quot;RelatedLinks&quot; controlvisibility=&quot;false&quot;/&gt;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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?&nbsp;&nbsp;&nbsp; Looking at the script generated I&#8217;m not
sure</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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'>&nbsp;&nbsp;&nbsp; goCWCJSAPI.RegisterEvent(LAYER_STATUS_CHANGED, &quot;LegendTemplateWLayersChanged&quot;);</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>&nbsp;&nbsp;&nbsp; goCWCJSAPI.RegisterEvent(LAYER_ORDER_CHANGED, &quot;LegendTemplateWLayersChanged&quot;);</span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>&nbsp;&nbsp;&nbsp; goCWCJSAPI.RegisterEvent(MAP_NEW_LAYER_ADDED, &quot;LegendTemplateWLayersChanged&quot;);</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'>&nbsp;&nbsp;&nbsp; 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'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</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>