diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-17 20:34:57 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-20 11:02:31 -0800 |
commit | 251925568c72dfe49cbb6b3a36dcc9fc7d80eb66 (patch) | |
tree | eec6674ad1513b7b5d199ad32443dae7cbf973dc /platform | |
parent | 51be461168364948a7e2126626f7b9ff121a2b61 (diff) | |
download | qtlocation-mapboxgl-251925568c72dfe49cbb6b3a36dcc9fc7d80eb66.tar.gz |
[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.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index d970eca004..3ecbeeb33a 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -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 |