diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2018-03-02 13:13:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 13:13:57 -0500 |
commit | 4919099ea9c7e5d2a0ed261b169c7c6a0e86a43f (patch) | |
tree | 3cc8f47f1caf4d0c4cefa561bf35dd2a83f9bd10 /platform/ios/app | |
parent | 4408e2f0bc00019bd6da07514a1117a129cca96f (diff) | |
download | qtlocation-mapboxgl-4919099ea9c7e5d2a0ed261b169c7c6a0e86a43f.tar.gz |
[ios] Add MGLMapView.showsScale to control scale bar visibility (#11335)
- Fixes scale bar not being visible until a camera change event.
- Adds IBInspectable for scale bar visibility.
- Add tests of the scale bar being added to the map view
Diffstat (limited to 'platform/ios/app')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 5b9363af27..4da810a7af 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -164,7 +164,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [self restoreState:nil]; self.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsDebugLoggingEnabled"]; - self.mapView.scaleBar.hidden = NO; + self.mapView.showsScale = YES; self.mapView.showsUserHeadingIndicator = YES; if ([UIFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) { self.hudLabel.titleLabel.font = [UIFont monospacedDigitSystemFontOfSize:10 weight:UIFontWeightRegular]; |