mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.35k stars 1.33k forks source link

MGLMapView doesn't expose an API to control the system of measurement used for the scale bar #16571

Open adam-schoonmaker opened 3 years ago

adam-schoonmaker commented 3 years ago

Our app allows users to configure the system of measurement used by the app, separately from what their current locale is. For example, a user with an English UK locale may choose to still use imperial units instead of metric.

MGLMapView doesn't expose an API to programmatically change the system of measurement used. There's MGLScaleBar which appears to have a single method usesMetricSystem that could be overridden to achieve this. However, MGLScaleBar isn't exposed on the MGLMapView, and neither of them have a hook for controlling this behavior.

This causes an issue where our users who are in metric locales with the imperial setting in our app are still seeing metric units on the MGLScaleBar, and vice versa for folks in imperial locales.

This looks to be a dupe of this stale issue.

Steps to reproduce

N/A

Expected behavior

N/A

Actual behavior

N/A

Configuration

N/A