# Maps application only providing directions in Kilometers instead of Miles

**URL:** <https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076>\
**Category:** ℹ️ Support\
**Tags:** maps-app\
**Created:** [March 11, 2024, 3:40pm UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076 "2024-03-11T15:40:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Nilson](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jim_nilson/32/50351_2.png) [@Jim\_Nilson](https://help.nextcloud.com/u/Jim_Nilson)\
**Post date:** [March 11, 2024, 3:40pm UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076/1 "2024-03-11T15:40:34Z")

</div>

I am using the maps application with graphopper. I used to be able to get directions in miles but now the app seems to only provide direction in KM. I checked the locale and find it is set correctly. Also uninstalled and reinstalled the applications. Looking for ideas on how to troubleshoot/resolve

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [March 12, 2024, 11:04am UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076/2 "2024-03-12T11:04:20Z")

</div>

They say the maps app is using imperial for en\_US:

> <https://github.com/nextcloud/maps/issues/412>
>
> Currently, the metric/imperial option is hard coded in src/script.js. As measure…ment units can be a personal preference, or a user may have grown up learning one system, but now live in a country which uses another, please consider allowing the user to specify their preference.
> 
> Also, en\_AU and en\_NZ are listed in src/script.js as imperial countries. They most certainly are not and have not been for a long time. Please remove these countries from the imperial list.

Does this work for you, or are you not in the US and in another country that uses imperial (Liberia or Myanmar), not sure if these locales have been adjusted as well.

---

<div class="post-metadata">

**Author:** ![Jim\_Nilson](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jim_nilson/32/50351_2.png) [@Jim\_Nilson](https://help.nextcloud.com/u/Jim_Nilson)\
**Post date:** [March 12, 2024, 4:10pm UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076/3 "2024-03-12T16:10:36Z")

</div>

I tried the other Locale settings you mentioned but the maps app is still rendering directions in the map application in metric . I am using the AIO version of nextcloud so maybe the location of script.js is different. I did a find and found several instances of it. I looked through some of them but didn’t find reference to locale. Not sure how to troubleshoot further. At this point if I cannot make this work the app will be of little use to me

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [March 12, 2024, 5:36pm UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076/4 "2024-03-12T17:36:27Z")

</div>

I just found this in the code:

```auto
export const getShouldMapUseImperial = () => {
	const locale = OC.getLocale()

	return (
		locale === 'en_US'
    || locale === 'en_GB'
    || locale === 'en_AU'
    || locale === 'en_IE'
    || locale === 'en_NZ'
    || locale === 'en_CA'
	)
}

```

I don’t see where this reference is used to do the actual conversion. Perhaps in some 3rd-party import?  
In such a case, I think it is best to check with the developers.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:38am UTC](https://help.nextcloud.com/t/maps-application-only-providing-directions-in-kilometers-instead-of-miles/185076/5 "2025-01-16T08:38:15Z")

</div>


