mapbox / mapbox/mapbox-maps-ios

Pins are flickering when leaving the safeArea during drag gesture

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

Nobody has claimed this yet.

auto-triaged bug :beetle:
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.