<div>you need to find your map resource content in xml then find the node of your new layer group and set ExpandInLegend to true </div>
<div> </div>
<div>see map definition schema:</div>
<div><a href="http://www.osgeo.org/files/mapguide/docs/2.0/xml_schemas/MapDefinition/MapDefinition.html#element_MapLayerGroup_Link06A87530">http://www.osgeo.org/files/mapguide/docs/2.0/xml_schemas/MapDefinition/MapDefinition.html#element_MapLayerGroup_Link06A87530</a>.<br>
<br></div>
<div> </div>
<div class="gmail_quote">On Mon, Oct 18, 2010 at 3:02 PM, kelll <span dir="ltr">&lt;<a href="mailto:kellieharrisson@sierrasystems.com">kellieharrisson@sierrasystems.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Question 1:<br>I have added a runtime layer and upon using reloadMap(); the legend shows<br>the new layer group and layer, but it is not expanded. I would like to<br>
expand this new group.<br><br>I found the following post through search:<br><a href="http://osgeo-org.1803224.n2.nabble.com/How-to-expand-legend-programatically-in-Fusion-td4561423.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/How-to-expand-legend-programatically-in-Fusion-td4561423.html</a><br>
<br>In Kori&#39;s reply to this post, he/she lists a set of commands based on the<br>widget javascript.<br>One of the commands is:<br><br>Fusion.getWidgetById(&#39;Legend&#39;).renderer.expandBranch(folder);<br><br>Unfortunately I need a little more context to this code.<br>
In particular, I need to know how the folder is derrived.<br>Some sample code would be appreciated! Or please direct me to a sample<br>website.<br><br>Question 2:<br>Also in regards to the OSGeo.MapGuide.MgLayerGroup property &#39;ExpandInLegend&#39;<br>
- why does this only have a get and no set? &#39;DisplayInLegend&#39; has a set and<br>a get. It would have been really convenient to just use this<br>&#39;ExpandInLegend&#39; property. Is there a way I can change this to it has a set?<br>
I have attached a screen shot of this property.<br><a href="http://osgeo-org.1803224.n2.nabble.com/file/n5648915/ExpandInLegend.png" target="_blank">http://osgeo-org.1803224.n2.nabble.com/file/n5648915/ExpandInLegend.png</a><br>
ExpandInLegend.png<br><font color="#888888">--<br>View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/How-to-expand-group-in-Legend-tp5648915p5648915.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/How-to-expand-group-in-Legend-tp5648915p5648915.html</a><br>
Sent from the MapGuide Users mailing list archive at Nabble.com.<br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br></font></blockquote></div><br><br clear="all"><br>-- <br>Nick Xu<br>