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

Commit aa51c15

Browse files
committed
Merge pull request #1852 from mapbox/update-user-dot-once
refs #1125, 1813: update user dot tracking in one place
2 parents fb230dd + ed04e6d commit aa51c15

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

platform/ios/MGLMapView.mm

+2-6
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,8 @@ - (void)glkView:(__unused GLKView *)view drawInRect:(__unused CGRect)rect
688688
_mbglMap->setSourceTileCacheSize(cacheSize);
689689

690690
_mbglMap->renderSync();
691+
692+
[self updateUserLocationAnnotationView];
691693
}
692694
}
693695

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

23522354
self.userLocationAnnotationView.haloLayer.hidden = ! CLLocationCoordinate2DIsValid(self.userLocation.coordinate) ||
23532355
newLocation.horizontalAccuracy > 10;
2354-
2355-
[self updateUserLocationAnnotationView];
23562356
}
23572357

23582358
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager
@@ -2509,8 +2509,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
25092509
case mbgl::MapChangeRegionWillChange:
25102510
case mbgl::MapChangeRegionWillChangeAnimated:
25112511
{
2512-
[self updateUserLocationAnnotationView];
2513-
25142512
[self deselectAnnotation:self.selectedAnnotation animated:NO];
25152513

25162514
BOOL animated = (change == mbgl::MapChangeRegionWillChangeAnimated);
@@ -2545,7 +2543,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
25452543
}
25462544
case mbgl::MapChangeRegionIsChanging:
25472545
{
2548-
[self updateUserLocationAnnotationView];
25492546
[self updateCompass];
25502547

25512548
if ([self.delegate respondsToSelector:@selector(mapViewRegionIsChanging:)])
@@ -2557,7 +2554,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change
25572554
case mbgl::MapChangeRegionDidChange:
25582555
case mbgl::MapChangeRegionDidChangeAnimated:
25592556
{
2560-
[self updateUserLocationAnnotationView];
25612557
[self updateCompass];
25622558

25632559
if (self.pan.state == UIGestureRecognizerStateChanged ||

0 commit comments

Comments
 (0)