[mapguide-users] How to expand legend programatically in Fusion

Mike Adair madair at dmsolutions.ca
Fri Feb 26 10:11:10 EST 2010


The doc pages that Jason mention are good for the ApplicationDefinition 
configuration options, and we definitely welcome contributions in the 
documentation area.  Unfortunately there isn't much in the way of a 
Javascript API documentation yet, although I have started to work on 
such docs for the MapWidget and the main Fusion object so hopefully 
there will be some NaturalDocs style documentation for widgets that 
way.  Again patches for documentation are most welcome, but in the 
meantime, your best bet is to go and read the actual code.

Mike



Jason Birch wrote:
> Guys,
>
> The Fusion widget docs section in fusion Trac has special pages for
> documenting features that are not extractable from the xml files. See
> the link at the top of this page for example:
>
> http://trac.osgeo.org/fusion/wiki/Widgets/Legend
>
>  It would be great if you could add these as you find them... If you
> choose to do this, you'll have to log in with your OSGeo ID to create
> pages, and may also need one of the Fusion admins to give permissions.
>
> Jason
>
> On 2010-02-25, Kori Maleski <kori.maleski at gmail.com> wrote:
>   
>> I think it is easy enough to review the widget javascript to determine the
>> Fusion API calls - in the case of what hasn't been documented.
>>
>> http://demo.mapserver.org/fusion/widgets/
>>
>>
>> For the Legend:
>>
>> Fusion.getWidgetById('Legend').renderer.expandAll()
>> Fusion.getWidgetById('Legend').renderer.collapseAll()
>> Fusion.getWidgetById('Legend').renderer.collapseBranch(folder)
>> Fusion.getWidgetById('Legend').renderer.expandBranch(folder)
>> Fusion.getWidgetById('Legend').renderer.update()
>> Fusion.getWidgetById('Legend').renderer.clear()
>>
>> For the TaskFrame:
>>
>> Fusion.getWidgetById('TaskFrame').updateButtons()
>> Fusion.getWidgetById('TaskFrame').gotoPrevTask()
>> Fusion.getWidgetById('TaskFrame').gotoNextTask()
>> Fusion.getWidgetById('TaskFrame').goHome()
>> Fusion.getWidgetById('TaskFrame').setContent(url)
>>
>>
>> Cheers,
>>
>> Kori Maleski
>>
>>
>> On Thu, Feb 25, 2010 at 5:48 PM, GordonL
>> <gordon.luckett at arrowgeomatics.com>wrote:
>>
>>     
>>> Hi Mike,
>>> I have been searching for a definitive list of Fusion API calls.
>>> For example, only through some hacking and searhing have I found some of
>>> the
>>> methods and properties for some of the widgets, such as:
>>>
>>> Fusion.getWidgetById('Legend').renderer.expandAll();
>>>
>>> or
>>>
>>> Fusion.getWidgetById('TaskFrame').setContent(‘http://osgeo.org');
>>>
>>> Do you know where I can find the methods for these widgets? (like
>>> expandAll
>>> or setContent)
>>>
>>> thanks
>>> gordon
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/How-to-expand-legend-programatically-in-Fusion-tp4561423p4636440.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
>>>
>>>       
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>   

-- 
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   madair at dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca




More information about the mapguide-users mailing list