mapbox / mapbox/mapbox-maps-ios
View annotation update removes feature association
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: 13.2
- iOS version: 15.2
- Maps SDK Version: 10.2.0
## Observed behavior and steps to reproduce
View annotation update removes feature association.
```
let view = UIView()
try mapView.viewAnnotations.add(view, options: ViewAnnotationOptions(geometry: Point(coordinate), width: 10, height: 10, associatedFeatureId: "view-0", visible: false))
try mapView.viewAnnotations.update(view, options: ViewAnnotationOptions(visible: true))
mapView.viewAnnotations.view(forFeatureId: "view-0")
```
last line returns nil
## Expected behavior
View annotation update doesn't remove feature association.
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 issue with the ViewAnnotations add and update calls shown in the report, then inspect the viewAnnotations update path and ViewAnnotationOptions handling. Done means updating visible from false to true preserves the associatedFeatureId, so view(forFeatureId: "view-0") returns the view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100