-
<static> kilometersToUI(km, The)
-
Converts kilometers to a UI distance, either the same value, or converted to miles depending on settings.
Parameters:
Name |
Type |
Description |
km |
number
|
The input distance in kilometers |
The |
number
|
UI distance in the units specified by settings |
-
<static> uiToKilometers(uiDistance)
-
Converts a UI distance (eg from a form control) to kilometers,
accounting for the global units setting
Parameters:
Name |
Type |
Description |
uiDistance |
number
|
The distance from the UI, could be in miles or kilometers depending on settings |
Returns:
The input distance in kilometers
-
Type
-
number
-
<static> uiToMeters(uiDistance)
-
Converts a UI distance (eg from a form control) to meters,
accounting for the global units setting
Parameters:
Name |
Type |
Description |
uiDistance |
number
|
The distance from the UI, could be in miles or kilometers depending on settings |
Returns:
The input distance in meters
-
Type
-
number
-
<static> uiToMiles(uiDistance)
-
Converts a UI distance (eg from a form control) to miles, according to settings
Parameters:
Name |
Type |
Description |
uiDistance |
number
|
The distance from the UI, could be in miles or kilometers depending on settings |
Returns:
The input distance
-
Type
-
number