summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLScaleBar.mm
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-07-05 18:06:51 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-07-05 18:06:51 -0700
commit74bcca380dd7faa7a629d59e3346506e6a8cca34 (patch)
tree246d8c587621fcc753bfafc3f85afdb94e8460c9 /platform/ios/src/MGLScaleBar.mm
parent5921f692e085bde5d4e8000c33dac29c796acbf0 (diff)
parent6ca8cd7e24cf919d5eeb0be49d34a02ba9969ac8 (diff)
downloadqtlocation-mapboxgl-74bcca380dd7faa7a629d59e3346506e6a8cca34.tar.gz
Merge remote-tracking branch 'origin/tvn-merge-release'
Diffstat (limited to 'platform/ios/src/MGLScaleBar.mm')
-rw-r--r--platform/ios/src/MGLScaleBar.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm
index cd88c1e08e..410aa7d57e 100644
--- a/platform/ios/src/MGLScaleBar.mm
+++ b/platform/ios/src/MGLScaleBar.mm
@@ -188,9 +188,9 @@ static const CGFloat MGLFeetPerMeter = 3.28084;
- (MGLRow)preferredRow {
CLLocationDistance maximumDistance = [self maximumWidth] * [self unitsPerPoint];
- MGLRow row;
BOOL useMetric = [self usesMetricSystem];
+ MGLRow row = useMetric ? MGLMetricTable[0] : MGLImperialTable[0];
NSUInteger count = useMetric
? sizeof(MGLMetricTable) / sizeof(MGLMetricTable[0])
: sizeof(MGLImperialTable) / sizeof(MGLImperialTable[0]);