[Chameleon-dev] [Bug 1817] [Chameleon-Widgets]Javascript in legend template (LegendTemplate widget) is not executed in JSAPI mode

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Tue Nov 13 10:45:43 EST 2007


http://bugzilla.maptools.org/show_bug.cgi?id=1817





------- Additional Comments From nsavard at mapgears.com  2007-11-13 10:45 -------
Fixed but not commited to CVS.  For an application to use the cExpander legend
modifyLegendTemplateProcessed() must be called in myOnLoad().  Also the map
legend/layer control and the LegendTemplate widget definition must be added in
the application template.  There are six new functions in sample.js (file
attached):  ChangeLayerStatus(), ChangeAllLayersStatus(), searchDomElement(),
buildLegend(),  createLegendObjects() and modifyLegendTemplateProcessed().

modifyLegendTemplateProcessed() modifies the LegendTemplateProcessed() JSAPI
prototype to call buildLegend().  This function must be called each time the
legendTemplateDiv div is replaced. buildLegend() looks in the legendTemplateDiv
div for the first group node element via searchDomElement() and it calls
createLegendObjects() to create the expander and checkbox objects for all groups
and layers.

When a user selects turn on/off link ChangeAllLayersStatus() is called.  If a
layer/group checkbox is clicked ChangeLayerStatus() is called. 



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list