diff options
author | Jason Wray <jason@kulturny.com> | 2015-08-10 14:14:58 -0400 |
---|---|---|
committer | Jason Wray <jason@kulturny.com> | 2015-08-10 17:36:23 -0400 |
commit | dc11b8132ba7ccc58c280e580526425e7389df86 (patch) | |
tree | ee32ddb9f7d1992bc17b963c7bfe3658d769924c /platform | |
parent | 26d300b4f435519b73743b36b48bf5cf71a678a4 (diff) | |
download | qtlocation-mapboxgl-dc11b8132ba7ccc58c280e580526425e7389df86.tar.gz |
Improve accuracy ring update checks
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLUserLocationAnnotationView.m | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/platform/ios/MGLUserLocationAnnotationView.m b/platform/ios/MGLUserLocationAnnotationView.m index a6310a82c3..536326d1f6 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 |