Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Improve accuracy ring update checks
Browse files Browse the repository at this point in the history
  • Loading branch information
friedbunny committed Aug 10, 2015
1 parent 26d300b commit dc11b81
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions platform/ios/MGLUserLocationAnnotationView.m
Expand Up @@ -119,16 +119,10 @@ - (void)setupLayers
_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
Expand Down

0 comments on commit dc11b81

Please sign in to comment.