mapbox / mapbox/mapbox-maps-ios

View annotation update removes feature association

Open
#968 0 comments 1 reaction 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: 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.