formatDistance
This will recalculate and format a distance based on the parameters inputted. The value will be rounded for visual display and a distance suffix like 'km' for kilometers or 'ft' for foot/feet will be included.
Return
an object containing values for displaying the formatted distance
Parameters
in meters
used to alter the original value for display purposes
indicates whether the value should be returned as metric or imperial
a context for determining the correct value for the distance display, for example 3.5 or 3,5
a specified locale to use rather than the default locale provided by the context
This will recalculate and format a distance based on the parameters inputted. The value will be rounded for visual display and a distance suffix like 'km' for kilometers or 'ft' for foot/feet will be included.
Return
an object containing values for displaying the formatted distance
Parameters
in meters
used to alter the original value for display purposes
indicates whether the value should be returned as metric or imperial
a context for determining the correct value for the distance display, for example 3.5 or 3,5
This will recalculate and format a distance based on the parameters inputted. The value will be rounded for visual display and a distance suffix like 'km' for kilometers or 'ft' for foot/feet will be included.
Return
an object containing values for displaying the formatted distance
Parameters
in meters
used to alter the original value for display purposes
indicates whether the value should be returned as metric or imperial