-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Concurrent transition animations #3625
Comments
Can you say more about why it needs to support this? |
On iOS, in heading tracking mode, user location updates typically come in every second or so (less frequently when there’s poor GPS connectivity), while heading updates come in more or less in real time from the on-board magnetometer. MGLMapView pans to the new location with animation and also independently rotates to the new heading with animation. However, if you’re in motion and aren’t keeping your device pointed in a constant direction, heading updates tend to interrupt animations to new locations. On master, this is perceived as the map jumping from location to location with smooth rotation. In #3589, this is perceived as a series of smooth rotations in one place, followed by rapid panning as the location updates catch up. I considered less drastic approaches to addressing this issue, such as allowing callers to |
What does "update the camera" mean here? If I do map.getLatLng in the middle of an animation do I get the current location or the location of the beginning of the animation? |
CameraOptions is passed in by reference, so I considered checking on each frame whether the CameraOptions fields had changed and adjust accordingly. But that would never yield a pleasing animation and introduces too much complexity into what are already complex
You get the current location. That won’t change. |
A completely different approach to this problem would be to have platform-specific SDK code drive the animation. iOS, macOS, and Qt (not sure about Android) all have rich animation APIs, with options for keyframe animation, spring animations, and physics modeling, all things we wouldn’t want to have to build in mbgl and expose as a somewhat foreign-looking API. Animation notifications also become more predictable because only one layer of the stack is involved. However, perhaps /cc @tmpsantos |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello everyone. This is really annoying, especially with a minimal zoom on the user position (many animation when I walk + many animation for heading) Any workaround for this ? |
Ahoy, I up it ! Any announcements or any good workaround ? thanks anyway |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
This is still a need, particularly so that heading tracking isn’t mutually exclusive of location tracking: #3625 (comment). |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
mbgl::Transform
only supports one transition animation at a time, and starting an animation ends any existing animation (see #3624).mbgl::Transform
should be refactored to manage multiple concurrent animations, potentially with staggered start and end times. At a minimum, it should be possible for two animations that animate different properties to run without conflicting with one another./cc @ansis @lucaswoj
The text was updated successfully, but these errors were encountered: