MKDistanceFormatter: select default unit depending on purpose

Originator:futuretap
Number:rdar://30607921 Date Originated:20-Feb-2017 07:45 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:10.2
Classification:Enhancement Reproducible:Not Applicable
 
MKDistanceFormatter supports units=MKDistanceFormatterUnitsDefault to automatically select the right unit according to the locale.

However, different distance units should be used depending on the *purpose* of the distance:

- For elevation, feet or meters should be used but no miles, kilometers or yards (in the UK elevation is usually measured in meters)
- For biking or walking purposes in the UK, meters and kilometers should be used instead of yards and miles. However, for driving directions, yards and miles still make sense because UK road signs are overwhelmingly not metric.)

That's why I propose a `purpose` enum property with the following options: Driving, Walking, Biking, Elevation. The value of the purpose property can then influence the selected unit if units=MKDistanceFormatterUnitsDefault. 

The purpose could also inform rounding behavior. E.g. for elevation I'd propose to always round to the nearest integer, not the currently used rounding to the nearest 20/50/100 m/ft/yd.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!