3

Possible Duplicate:
Finding the distance, currency, temperature units etc. for a country (iPhone)

I haven't been able to find an answer to this question.

I am using the CLLocation method distanceFromLocation to get the distance between two coordinates, but the method returns the distance in meters.

Depending on the device's region settings I want to be able to dynamically determine if I should convert this to miles (e.g. if the user is american)

So this is not a question of HOW to convert but WHEN to convert

Any ideas?

Community
  • 1
  • 1
Nicolai Dahl
  • 259
  • 3
  • 9
  • Convert to the system of measurement [specified in NSLocale](http://stackoverflow.com/questions/2153302/finding-the-distance-currency-temperature-units-etc-for-a-country-iphone/2153385#2153385) – progrmr Sep 13 '11 at 13:51

1 Answers1

4

You could query the locale and then propose meters or miles. Best is to make it selectable. When the device owner's last name is like Cook, Drake etc. you could add a choice "nautic miles".

ott--
  • 5,642
  • 4
  • 24
  • 27