Maps SDK for Web
Class L.UnitSelector
This module helps you to create a unit measurement selector.
Methods
getHtmlElement(unitService): HTMLSelectElement
Returns a HTMLSelectElement filled with the supported measurement units.
The element has a function bound to its onchange event, which updates the units configuration of the UnitService instance given as argument.
Parameters
Name | Description | Required | Type/Values | Default |
---|---|---|---|---|
unitService | Unit service instance which will be bound to the generated dropdown. That means, that if you change value in this select, bound unitService will be updated. | Yes | UnitService | None |
Returns