[mapguide-users] How to expand group in Legend?

Nick nickcx at gmail.com
Tue Oct 19 23:58:50 EDT 2010


you need to find your map resource content in xml then find the node of your
new layer group and set ExpandInLegend to true

see map definition schema:
http://www.osgeo.org/files/mapguide/docs/2.0/xml_schemas/MapDefinition/MapDefinition.html#element_MapLayerGroup_Link06A87530
.


On Mon, Oct 18, 2010 at 3:02 PM, kelll <kellieharrisson at sierrasystems.com>wrote:

>
> Question 1:
> I have added a runtime layer and upon using reloadMap(); the legend shows
> the new layer group and layer, but it is not expanded. I would like to
> expand this new group.
>
> I found the following post through search:
>
> http://osgeo-org.1803224.n2.nabble.com/How-to-expand-legend-programatically-in-Fusion-td4561423.html
>
> In Kori's reply to this post, he/she lists a set of commands based on the
> widget javascript.
> One of the commands is:
>
> Fusion.getWidgetById('Legend').renderer.expandBranch(folder);
>
> Unfortunately I need a little more context to this code.
> In particular, I need to know how the folder is derrived.
> Some sample code would be appreciated! Or please direct me to a sample
> website.
>
> Question 2:
> Also in regards to the OSGeo.MapGuide.MgLayerGroup property
> 'ExpandInLegend'
> - why does this only have a get and no set? 'DisplayInLegend' has a set and
> a get. It would have been really convenient to just use this
> 'ExpandInLegend' property. Is there a way I can change this to it has a
> set?
> I have attached a screen shot of this property.
> http://osgeo-org.1803224.n2.nabble.com/file/n5648915/ExpandInLegend.png
> ExpandInLegend.png
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/How-to-expand-group-in-Legend-tp5648915p5648915.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>



-- 
Nick Xu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20101019/86e1a605/attachment.html


More information about the mapguide-users mailing list