mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Pins are flickering when leaving the safeArea during drag gesture

Open Bathilde opened this issue 2 months ago • 1 comments

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

Bathilde avatar Nov 28 '25 12:11 Bathilde

Thanks for a report Confirming the issue, internal ticket is MAPSNAT-3468

Until the bugfix landed I would recommend you to try enable back allowOverlap setting

OdNairy avatar Dec 01 '25 13:12 OdNairy