mapbox / mapbox-annotation-extension

Framework extensions that can be used with the Mapbox Maps SDK for iOS.
ISC License
11 stars 18 forks source link

MGLSymbolStyleAnnotation Flashing on Add/Remove #65

Open Tapestes opened 4 years ago

Tapestes commented 4 years ago

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.

flashing