From dc11b8132ba7ccc58c280e580526425e7389df86 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 10 Aug 2015 14:14:58 -0400 Subject: [PATCH] Improve accuracy ring update checks --- platform/ios/MGLUserLocationAnnotationView.m | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/platform/ios/MGLUserLocationAnnotationView.m b/platform/ios/MGLUserLocationAnnotationView.m index a6310a82c..536326d1f 100644 --- a/platform/ios/MGLUserLocationAnnotationView.m +++ b/platform/ios/MGLUserLocationAnnotationView.m @@ -119,16 +119,10 @@ const CGFloat MGLUserLocationAnnotationHaloSize = 115.0; _oldHeadingAccuracy = self.annotation.heading.headingAccuracy; } - // update accuracy ring + // update accuracy ring (if zoom or horizontal accuracy have changed) // - if (_accuracyRingLayer) + if (_accuracyRingLayer && (_oldZoom != self.mapView.zoomLevel || _oldHorizontalAccuracy != self.annotation.location.horizontalAccuracy)) { - // FIX: This stops EVERYTHING... and that isn't necessarily necessary, now is it? - if (_oldZoom == self.mapView.zoomLevel && _oldHorizontalAccuracy == self.annotation.location.horizontalAccuracy) - { - return; - } - CGFloat accuracyRingSize = [self calculateAccuracyRingSize]; // only show the accuracy ring if it won't be obscured by the location dot