From 4919099ea9c7e5d2a0ed261b169c7c6a0e86a43f Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Fri, 2 Mar 2018 13:13:57 -0500 Subject: [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 --- platform/ios/src/MGLMapView.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'platform/ios/src/MGLMapView.h') diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 44130f3c6d..52d28d871c 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -220,9 +220,18 @@ MGL_EXPORT IB_DESIGNABLE */ - (IBAction)reloadStyle:(id)sender; +/** + A Boolean value indicating whether the map may display scale information. + + The scale bar may not be shown at all zoom levels. The view controlled by this + property is available at `scaleBar`. The default value of this property is + `NO`. + */ +@property (nonatomic, assign) BOOL showsScale; + /** A control indicating the scale of the map. The scale bar is positioned in the - upper-left corner. The scale bar is hidden by default. + upper-left corner. Enable the scale bar via `showsScale`. */ @property (nonatomic, readonly) UIView *scaleBar; -- cgit v1.2.1