<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Hello Jason,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">my name is dimy and I noticed that you received the following message from Alain last year. Were you able to get his example to work? If so I would like to know how you handled the following. I am having some trouble.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><SPAN>"The reference to the AJAX viewer in the legend control code was hardcoded. I </SPAN><BR><SPAN>changed this and I will submit the change to the mapguide trunk shortly. The </SPAN><BR><SPAN>reference to the legend control from the AJAX viewer is hold by a variable </SPAN><BR><SPAN>so all needs to be done is changing the content of this variable to point to </SPAN><BR><SPAN>the new control." </SPAN></DIV>
<P><SPAN></SPAN>&nbsp;</P>
<P><SPAN>Do you know which reference to the legend control should be changed and which content variable should be changed as well/</SPAN></P>
<P><SPAN></SPAN>&nbsp;</P>
<P><SPAN>Thanks so much for your help,</SPAN></P>
<P><SPAN>Dimy</SPAN></P>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR><SPAN>Jason, </SPAN><BR><SPAN></SPAN><BR><SPAN>I attached a couple HTML pages that show you a possible approach in </SPAN><BR><SPAN>displaying the legend control in another place In this example the legend </SPAN><BR><SPAN>control runs in an IFrame at the right of the viewer (see screen snapshot </SPAN><BR><SPAN>below </SPAN><BR><SPAN></SPAN><BR><SPAN>This approach requires no code change in the template files. The main issue </SPAN><BR><SPAN>is that the legend control and the viewer call each other, the viewer to set </SPAN><BR><SPAN>the scale as the map is navigated, or to refresh the control among other </SPAN><BR><SPAN>things, and the legend control to change the visibility of layers and </SPAN><BR><SPAN>groups. When the frame hosting the control changes, the way the control and </SPAN><BR><SPAN>the viewer reference each other in the code needs to change as
 well. The </SPAN><BR><SPAN>reference to the AJAX viewer in the legend control code was hardcoded. I </SPAN><BR><SPAN>changed this and I will submit the change to the mapguide trunk shortly. The </SPAN><BR><SPAN>reference to the legend control from the AJAX viewer is hold by a variable </SPAN><BR><SPAN>so all needs to be done is changing the content of this variable to point to </SPAN><BR><SPAN>the new control. </SPAN><BR><SPAN></SPAN><BR><SPAN>The sample script <B class=highlight>legendpane.html</B> shows you how to wait for the map to be </SPAN><BR><SPAN>fully initialed, create a new legend control (not the new parameter MAPFRAME </SPAN><BR><SPAN>to the LegendCtrl.php request), and when this control is fully initialized, </SPAN><BR><SPAN>sets a reference to it in the AJAX viewer. From that point on the AJAX </SPAN><BR><SPAN>viewer will interact with the new control. </SPAN><BR><SPAN></SPAN><BR><SPAN>The drawback of this approach is that the initial legend control is still
 </SPAN><BR><SPAN>there, only not visible. But its not a big deal, the control is inactive </SPAN><BR><SPAN>after you attached the new instance to the AJAX viewer. The advantage of </SPAN><BR><SPAN>this approach, which to my opinion far outweighs the drawback, is that it </SPAN><BR><SPAN>requires no change in the existing surround. </SPAN><BR><SPAN></SPAN><BR><SPAN>Alain </SPAN></DIV></div><br>

<hr size=1>Don't pick lemons.<br>
See all the <a href="http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw--">new 2007 cars</a> at <a href="http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw--">Yahoo! Autos.</a></body></html>