mapbox / mapbox/mapbox-maps-ios
Bearing image of puck-2d is very sluggish
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: 15.4.1
- Devices affected: All
- Maps SDK Version: 10.4.1
## Observed behavior and steps to reproduce
```
mapView.location.options.puckType = .puck2D(.init(topImage: nil,
bearingImage: .init(named: "UserLocation"),
shadowImage: nil)
```
If you use a pick-type of 2D an also set a bearing image, that will rotate when the user rotates his phone. This in general is very good.
The problem though is that it is very sluggish. So it seems like it animates (?) to the users bearing with a quite long duration. Compared to the animation there is in the stocks iOS maps app, it is super slow.
## Expected behavior
The bearing image change much snappier. Maybe even without animation?
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 by reproducing the behavior with mapView.location.options.puckType set to a 2D puck using the UserLocation bearing image on the listed iOS and Maps SDK versions. Investigate the bearing-image update and rotation behavior, then verify that changes track device bearing more responsively or without the reported long animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100