From f119524945b8aec8eb8fd5e98453846f400193c6 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Tue, 24 Oct 2017 12:03:36 -0700 Subject: [ios] Asynchronously dispatch scale bar updates on camera updates --- platform/ios/src/MGLMapView.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 0e76c0c71c..9d9fd7005a 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -5071,7 +5071,9 @@ public: [self updateCompass]; if (!self.scaleBar.hidden) { - [(MGLScaleBar *)self.scaleBar setMetersPerPoint:[self metersPerPointAtLatitude:self.centerCoordinate.latitude]]; + dispatch_async(dispatch_get_main_queue(), ^{ + [(MGLScaleBar *)self.scaleBar setMetersPerPoint:[self metersPerPointAtLatitude:self.centerCoordinate.latitude]]; + }); } if ([self.delegate respondsToSelector:@selector(mapViewRegionIsChanging:)]) -- cgit v1.2.1