Class dLegend
Object
|
+--dLegend
- class
dLegend
dLegend class contains legend data and wraps YAHOO treeview class to create a DHTML legend.
Defined in dlegend.js
Requires:
- YAHOO.js
- event.js
- dom.js
- treeview.js
- xmldom.js
- legend.css
Method Summary |
void
|
changeNodeStatus(<string> layerName, <boolean> status)
Method to programmatically turn a node on or off.
|
void
|
initialize(<string> elementId, <string> xmlContent)
Method to initialize dLegend.
|
void
|
setHandler(<int> type, handler)
Method to register a handler/callback that will get called when the user selects a legend node.
|
void
|
update(<int> scale)
Method to activate and inactivate nodes based on current map scale.
|
dLegend
dLegend()
Requires:- YAHOO.js
- event.js
- dom.js
- treeview.js
- xmldom.js
- legend.css
changeNodeStatus
void changeNodeStatus(<string> layerName, <boolean> status)
Method to programmatically turn a node on or off.
Parameters:
layerName
- is layer name equal to layer name in xml.
status
- toggle layer where true/on and false/off.
initialize
void initialize(<string> elementId, <string> xmlContent)
Method to initialize dLegend. This should be called after page load.
Parameters:
elementId
- of div element id.
xmlContent
- of xml representation of legend data.
setHandler
void setHandler(<int> type, handler)
Method to register a handler/callback that will get called when the user selects a legend node. Method should
be called after initialzation to be sure that the legend tree exists.
Parameters:
type
- constant indicating the handler type.
function
- handler of which the first two parameters will be a string layerName and boolean status.
update
void update(<int> scale)
Method to activate and inactivate nodes based on current map scale.
Parameters:
scale
- of current map scale
Documentation generated by
JSDoc on Fri May 5 14:01:20 2006