mapbox / mapbox/mapbox-annotation-extension
MGLSymbolStyleAnnotation Flashing on Add/Remove
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 11
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Reviewing issue #58, it doesn't look like there's a way to move a MGLSymbolStyleAnnotation. Based on the advice there, I'm removing the existing MGLSymbolStyleAnnotation and adding a new one, like so...
controller.removeStyleAnnotation(existingSymbol)
let symbol = MGLSymbolStyleAnnotation(coordinate: coord, iconImageName: name)
controller.addStyleAnnotation(symbol)
However, that's resulting in the symbol flashing on the screen (sample below). I tried getting rid of the text, getting rid of textVariableAnchor on the controller, and a few other things to see if it was text related, but the issue persists. Any thoughts on how I should be moving the MGLSymbolStyleAnnotation such that I won't get the flashing? Looks like some folks were using updateGeometryCoordinates(withDelta: delta), but I can't seem to get that to work. Appreciate the help.

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 with the MGLSymbolStyleAnnotation add/remove flow shown in the issue and compare it with updateGeometryCoordinates(withDelta: delta). Reproduce the flashing behavior on Mapbox Maps SDK for iOS, then verify that moving the annotation no longer causes visible flashing.
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
- Needs clarification
- Newbie friendliness
- 25/100