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

Animate the user dot #1582

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Animate the user dot #1582

merged 1 commit into from
Apr 18, 2016

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented May 18, 2015

Previously, the user dot would blit across the screen, and MGLMapView would try to keep up but would tragically remain one step behind. With this PR, the user and MGLMapView waltz happily together.

Depends on #3589. Fixes #1041. Ref #1125.

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS in progress labels May 18, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented May 18, 2015

I’d like to make user tracking smoother by sticking the user dot in the center of the screen and moving the viewport instead of the user dot. Unfortunately, -notifyMapChange: is called way too often, even from within mbgl::Map, preempting the animation by atomically moving the user dot to the final position.

@1ec5
Copy link
Contributor Author

1ec5 commented May 18, 2015

Another problem is that Transform::setLatLngZoom() hard-codes an ease-in/ease-out animation, whereas a linear animation is called for when animating user tracking.

@incanus
Copy link
Contributor

incanus commented May 18, 2015

Unfortunately, -notifyMapChange: is called way too often

#1431

Calling these sorts of methods per-frame is not useful to users

/cc @kkaefer

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 29, 2015

#2204 complicates things here too.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 17, 2016

I split the user tracking case out into #3589.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 19, 2016

I rebased this branch atop #3589. It looks pretty good, other than a brief misplacement of the callout after selecting a user dot that’s in motion.

/cc @friedbunny @zugaldia

@1ec5 1ec5 changed the title [WIP] Animate the user dot Animate the user dot Jan 19, 2016
@1ec5 1ec5 added the feature label Jan 19, 2016
@1ec5 1ec5 added this to the ios-v3.2.0 milestone Jan 19, 2016
@1ec5 1ec5 self-assigned this Jan 19, 2016
@1ec5 1ec5 added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Apr 18, 2016
@1ec5 1ec5 removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Apr 18, 2016
Use UIView animation to explicitly animate the user dot between user location updates. There is a tricky special case, which is that the callout must point to the annotation view’s implicit frame but must quickly rendezvous with the explicit frame.

Fixes #1041.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User location tracking is rough
3 participants