mapbox / mapbox/mapbox-maps-ios
FollowPuckViewportState suffers a visual delay when target zoom level is equal to the current zoom level of the map
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Xcode version: 13. 3
- iOS version: 17.4.1
- Devices affected:
- Maps SDK Version: 11.3.0
Observed behavior and steps to reproduce
When transitioning to a FollowPuckViewportState with an explicit zoom level, the transition seems to first animate the zoom, and then the center coordinate of the camera. This results in a noticeable visual delay when the current zoom level of the map is already at the target zoom level. To the end user this seems like nothing is happening for the first second or so.
Steps to reproduce
- Initiate a transition to a
FollowPuckViewportStatewith an explicit zoom level. The map will immediately animate to the desired zoom level and center coordinate of the location puck. - Move the map so it is no longer centered on the puck, but do not change the zoom level.
- Again initiate a transition to a
FollowPuckViewportStatewith the same explicit zoom level. The map will not visually change for a second or so, and only then animate to the center coordinate of the location puck.
Expected behavior
When the current zoom level is already at the level specified by the FollowPuckViewportStateOptions, I expect that part of the animation to be skipped.
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
Reproduce the transition using FollowPuckViewportState with an explicit zoom level, then repeat it after moving the map without changing zoom. Compare the timing when the current zoom matches the requested zoom; done means the camera begins centering without the reported visual delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100