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

Commit

Permalink
Merge pull request #1852 from mapbox/update-user-dot-once
Browse files Browse the repository at this point in the history
refs #1125, 1813: update user dot tracking in one place
  • Loading branch information
incanus committed Jul 8, 2015
2 parents fb230dd + ed04e6d commit aa51c15
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions platform/ios/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ - (void)glkView:(__unused GLKView *)view drawInRect:(__unused CGRect)rect
_mbglMap->setSourceTileCacheSize(cacheSize);

_mbglMap->renderSync();

[self updateUserLocationAnnotationView];
}
}

Expand Down Expand Up @@ -2351,8 +2353,6 @@ - (void)locationManager:(__unused CLLocationManager *)manager didUpdateToLocatio

self.userLocationAnnotationView.haloLayer.hidden = ! CLLocationCoordinate2DIsValid(self.userLocation.coordinate) ||
newLocation.horizontalAccuracy > 10;

[self updateUserLocationAnnotationView];
}

- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager
Expand Down Expand Up @@ -2509,8 +2509,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
case mbgl::MapChangeRegionWillChange:
case mbgl::MapChangeRegionWillChangeAnimated:
{
[self updateUserLocationAnnotationView];

[self deselectAnnotation:self.selectedAnnotation animated:NO];

BOOL animated = (change == mbgl::MapChangeRegionWillChangeAnimated);
Expand Down Expand Up @@ -2545,7 +2543,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
}
case mbgl::MapChangeRegionIsChanging:
{
[self updateUserLocationAnnotationView];
[self updateCompass];

if ([self.delegate respondsToSelector:@selector(mapViewRegionIsChanging:)])
Expand All @@ -2557,7 +2554,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
case mbgl::MapChangeRegionDidChange:
case mbgl::MapChangeRegionDidChangeAnimated:
{
[self updateUserLocationAnnotationView];
[self updateCompass];

if (self.pan.state == UIGestureRecognizerStateChanged ||
Expand Down

0 comments on commit aa51c15

Please sign in to comment.