summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-07-08 12:21:40 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-07-08 12:55:39 -0700
commita67e80219f90c409dfce8bfef91d9131dabd8d4f (patch)
tree9f49313c49707f7a624f9893956a692602a84b35 /platform/ios
parentb8388168dd130c67c77254565cdb576df7905915 (diff)
downloadqtlocation-mapboxgl-a67e80219f90c409dfce8bfef91d9131dabd8d4f.tar.gz
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.
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/MGLMapView.mm9
1 files changed, 3 insertions, 6 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index 01a716ad96..f527a9a2e9 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -688,6 +688,9 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
_mbglMap->setSourceTileCacheSize(cacheSize);
bool needsRerender = _mbglMap->renderSync();
+
+ [self updateUserLocationAnnotationView];
+
_mbglMap->nudgeTransitions(needsRerender);
}
}
@@ -2352,8 +2355,6 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
self.userLocationAnnotationView.haloLayer.hidden = ! CLLocationCoordinate2DIsValid(self.userLocation.coordinate) ||
newLocation.horizontalAccuracy > 10;
-
- [self updateUserLocationAnnotationView];
}
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager
@@ -2510,8 +2511,6 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
case mbgl::MapChangeRegionWillChange:
case mbgl::MapChangeRegionWillChangeAnimated:
{
- [self updateUserLocationAnnotationView];
-
[self deselectAnnotation:self.selectedAnnotation animated:NO];
BOOL animated = (change == mbgl::MapChangeRegionWillChangeAnimated);
@@ -2546,7 +2545,6 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
}
case mbgl::MapChangeRegionIsChanging:
{
- [self updateUserLocationAnnotationView];
[self updateCompass];
if ([self.delegate respondsToSelector:@selector(mapViewRegionIsChanging:)])
@@ -2558,7 +2556,6 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
case mbgl::MapChangeRegionDidChange:
case mbgl::MapChangeRegionDidChangeAnimated:
{
- [self updateUserLocationAnnotationView];
[self updateCompass];
if (self.pan.state == UIGestureRecognizerStateChanged ||