From ed04e6d9f712437bc29502e134250cd979c74b64 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 8 Jul 2015 12:21:40 -0700 Subject: [PATCH] refs #1125, 1813: update user dot tracking in one place Now that we have cleanup around the map viewport change notifications, this only needs to happen in one place: the GL frame draw loop. --- platform/ios/MGLMapView.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 6f6a6d9ae1d..d6500889f95 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -688,6 +688,8 @@ - (void)glkView:(__unused GLKView *)view drawInRect:(__unused CGRect)rect _mbglMap->setSourceTileCacheSize(cacheSize); _mbglMap->renderSync(); + + [self updateUserLocationAnnotationView]; } } @@ -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 @@ -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); @@ -2545,7 +2543,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change } case mbgl::MapChangeRegionIsChanging: { - [self updateUserLocationAnnotationView]; [self updateCompass]; if ([self.delegate respondsToSelector:@selector(mapViewRegionIsChanging:)]) @@ -2557,7 +2554,6 @@ - (void)notifyMapChange:(mbgl::MapChange)change case mbgl::MapChangeRegionDidChange: case mbgl::MapChangeRegionDidChangeAnimated: { - [self updateUserLocationAnnotationView]; [self updateCompass]; if (self.pan.state == UIGestureRecognizerStateChanged ||