mapbox / mapbox/mapbox-maps-ios

FollowPuckViewportState suffers a visual delay when target zoom level is equal to the current zoom level of the map

Open
#2,171 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle: needs info
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
  1. Initiate a transition to a FollowPuckViewportState with an explicit zoom level. The map will immediately animate to the desired zoom level and center coordinate of the location puck.
  2. Move the map so it is no longer centered on the puck, but do not change the zoom level.
  3. Again initiate a transition to a FollowPuckViewportState with 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.