mapbox / mapbox/mapbox-maps-ios
MapViewAnnotation positions not updated after device rotation in non-full-screen iPad window
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## 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


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
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
Reproduce the issue with MapViewAnnotation in a SwiftUI Map on an iPad using Split View, Slide Over, or a resized Stage Manager window, then rotate the device and compare the annotation positions with layer-based annotations. Start by tracing the MapViewAnnotation geometry and rotation-update path; done means annotations are recalculated and remain aligned with their geographic coordinates without requiring a window resize.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100