mapbox / mapbox/mapbox-maps-ios

Visible property is removing ViewAnnotation from the list

Open
#1,967 9 comments 0 reactions 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

I have integrated a functionality in which I have to show/hide my view annotation but I have seen that once visibility property is set either true or false then I am unable to access that view annotation which is really strange. SO please let me know what's going on. I am testing even after setting a `visible` to true it is showing but I am unable to access that with `associatedFeatureId`

`print(mapView.viewAnnotations.view(forFeatureId: "abc_xyz") == nil)`

This is returning true after setting visible property either `true` or `false` no matter

Update:

changing any property is kind of removing the annotation means that you can only update the annotation at once and after that you won't be able to find the annotation by id and that's a strange behavior.

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 iOS viewAnnotations API, changing the visible property and then calling view(forFeatureId: "abc_xyz"). Confirm whether changing visibility or another property makes the annotation inaccessible; done means the annotation remains retrievable by its associated feature ID after updates.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.