TrafficLegendControl class
A control that display traffic legend on the map.
- Extends
Constructors
| Traffic |
Construct a traffic legend control |
Methods
| build |
Build the outermost container for the control, applies styling including any listeners for auto styling. |
| on |
Initialization method for the control which is called when added to the map. |
| on |
Method that is called when the control is removed from the map. Should perform any necessary cleanup for the control. |
Constructor Details
TrafficLegendControl()
Construct a traffic legend control
new TrafficLegendControl()
Method Details
buildContainer<K>(Map, ControlStyle, string, K)
Build the outermost container for the control, applies styling including any listeners for auto styling.
function buildContainer<K>(map: Map, style: ControlStyle, ariaLabel?: string, tagName?: K)
Parameters
- map
- Map
- style
- ControlStyle
- ariaLabel
-
string
- tagName
-
K
Returns
HTMLElementTagNameMap[K]
onAdd(Map)
Initialization method for the control which is called when added to the map.
function onAdd(map: Map)
Parameters
- map
- Map
The map that the control will be added to.
Returns
HTMLElement
An HTMLElement to be placed on the map for the control.
onRemove()
Method that is called when the control is removed from the map. Should perform any necessary cleanup for the control.
function onRemove()