mapbox / mapbox/mapbox-maps-ios
ViewAnnotation animation via CADisplayLink isn't smooth enough
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Hi there, I'm trying to animate ViewAnnotation over two coordinates.
Here is an example how to do this: https://github.com/mapbox/mapbox-maps-ios/blob/main/Apps/Examples/Examples/All%20Examples/Annotations/ViewAnnotationAnimationExample.swift
But I have a question, if I change animation time in this example from 30 sec to 1 sec the viewAnnotation's animation looks twitchy and torn, and it's not as smooth as it supposed to be.
Previously I had an experience doing the same on Mapbox v6.* using UIView.animate { ... } - and it worked perfectly
So the question is why is this happening? Is there any option else to animate ViewAnnotation over a route to make as smooth as it was before?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Apps/Examples/Examples/All Examples/Annotations/ViewAnnotationAnimationExample.swift and reproduce the ViewAnnotation animation with a one-second duration using CADisplayLink. Compare the behavior with the earlier UIView.animate approach, then establish whether the result is an implementation bug or a documented limitation and record the supported way to achieve smooth motion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100