A LegendMapOrchestrator populates a LegendControl and connects it to an OpenLayers map so that overlay toggle events change the visibility of the corresponding OpenLayers layers. The LegendControl is only populated with legend data for layers of the type OpenLayers.Layer.MappingServiceLayer. Data for any other layers has to be added during the ria.legend.LegendControl#event:onPreRenderData event, if desired. To initialise the orchestration between a LegendControl and a map call #init(). To free up any resources once the LegendControl or map is taken out of service, call #destroy().
Method Attributes | Method Name and Description |
---|---|
destroy()
Unlinks the LegendControl by releasing all event listeners.
|
|
init()
Populates the legend with the overlays from the map passed to the
constructor and wires the respective overlays to the LegendControl's
onOverlayToggled events. |
onOverlayToggled
events.