mapbox / mapbox/mapbox-maps-ios
Pins are flickering when leaving the safeArea during drag gesture
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Xcode version: 26.0
- iOS version: 18.6 and 26
- Maps SDK Version: 11.6.1
Observed behavior and steps to reproduce
Context: on the map there are two pins with multiple possible anchors.
When I reach the end of the safe area, during the drag gesture, the pins are flickering.
For context, this is how the map pins are initialised.
MapViewAnnotation(coordinate: coordinate) {
MyView(anchor: anchor)
}
.allowOverlap(false)
.ignoreCameraPadding(true)
.variableAnchors([
ViewAnnotationAnchorConfig(anchor: .bottomLeft),
ViewAnnotationAnchorConfig(anchor: .bottomRight),
ViewAnnotationAnchorConfig(anchor: .topLeft),
ViewAnnotationAnchorConfig(anchor: .topRight)
])
.onAnchorChanged { config in
onAnchorChanged(config.anchor)
}
Would it be possible to add a delay to update the pins during the drag gestures?
https://github.com/user-attachments/assets/bb274e50-fa1a-44e7-9533-b1b6f1547680
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 flicker with the MapViewAnnotation configuration shown, especially variableAnchors, allowOverlap(false), and ignoreCameraPadding(true), while dragging pins across the safe-area boundary. Investigate the anchor-update behavior during the gesture; done means the pins no longer flicker when leaving the safe area, with the requested behavior covered by a regression check if the project provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100