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

refs #1125, 1813: update user dot tracking in one place #1852

Merged
merged 1 commit into from
Jul 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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