Skip to main content
Version: v3+

hmSetting.getMileageUnit()

Returns whether the current distance unit is metric or imperial.

This method is to get the units set by the user and does not represent the units of the data. The units of the data refer to the interface description of the corresponding data.

Type

() => result

Parameters

result

DescriptionType
The current distance unit, 0:metric, 1:imperial, others are invalidnumber

Code example

const mileageUnit = hmSetting.getMileageUnit()