Skip to content

MapViewAnnotation positions not updated after device rotation in non-full-screen iPad window #2415

@ruslankuksa

Description

@ruslankuksa

Environment

  • Mapbox Maps SDK: 11.18.2
  • Xcode: 26.3
  • iOS: 26.4
  • Device: iPad 11 Pro (physical)
  • SwiftUI

Observed behavior and steps to reproduce

When using MapViewAnnotation in a SwiftUI Map, annotation positions become incorrect after device rotation when the app window is not full-screen (Split View, Slide Over, or Stage Manager resized window).

The annotations remain at their pre-rotation screen positions instead of being recalculated for the new map projection.

Expected behavior

Annotations should reposition to match their geographic coordinates in the new map projection, just like PolylineAnnotation and other layer-based annotations do.

Notes / preliminary analysis

  • Full-screen window + rotation: annotations briefly shift but snap back correctly
  • Non-full-screen window + rotation: annotations shift and stay wrong
  • Dragging the system window resize handle immediately fixes the positions (annotations snap to correct locations)

Additional links and references

Image
Image

Workarounds attempted (none successful):

  • proxy.map?.triggerRepaint()
  • Camera center nudge and restore
  • Zoom nudge and restore
  • Viewport reset (.idle then restore)
  • .onGeometryChange to detect container size change

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something is broken!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions