[ios] Eliminated jump after flight to first location
Don’t update the user location annotation’s coordinates until after the transition to the first reported location is complete.
This commit is contained in:
committed by
Minh Nguyễn
parent
51be461168
commit
251925568c
@@ -3032,7 +3032,10 @@ std::chrono::steady_clock::duration MGLDurationInSeconds(float duration)
|
||||
|
||||
if (! oldLocation || ! CLLocationCoordinate2DIsValid(oldLocation.coordinate) || [newLocation distanceFromLocation:oldLocation])
|
||||
{
|
||||
self.userLocation.location = newLocation;
|
||||
if (self.userTrackingState != MGLUserTrackingStateBegan)
|
||||
{
|
||||
self.userLocation.location = newLocation;
|
||||
}
|
||||
|
||||
// deselect user if applicable since we don't do callout tracking yet
|
||||
if (self.selectedAnnotation == self.userLocation
|
||||
|
||||
Reference in New Issue
Block a user