summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLSymbolStyleLayer.mm
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-11-04 13:50:53 -0700
committerGitHub <noreply@github.com>2016-11-04 13:50:53 -0700
commit751aff2ddd1770d9842c273f65e8aad768112151 (patch)
tree73f1b9c38b77544ca66daa33450ff4fcba18b3eb /platform/darwin/src/MGLSymbolStyleLayer.mm
parent8afc68bbe4cdb81bbb758ea9d6f3e7880738fbbd (diff)
downloadqtlocation-mapboxgl-751aff2ddd1770d9842c273f65e8aad768112151.tar.gz
[ios, macos] Work around annotation race condition (#6924)
When annotations are removed concurrently with being updated because of a map redraw, it is possible that mbgl will still consider an annotation to exist depending on what part of the map lifecycle the call update annotations happens. However, the annotation context by tag map in MGLMapView (on the main thread) will always be up to date. This adds a guard that uses that map to avoid considering annotations that have actually been removed as visible. Another issue was that adding the same annotation object twice has always been allowed and has worked, visually. However, a recent refactor to make the reuse queue work correctly is not tolerant of the a single view representing two annotation instances that are the same. The effect is that a new UIView will be generated for each (clone) annotation that is added and only the last view will move with the map. The other views become detached and float around in the view as the map is panned. This commit adds a guard to make adding an annotation instance a no-op if it has already been added before.
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.mm')
0 files changed, 0 insertions, 0 deletions