Hi, I have a SwiftUI Map with a set of three annotations. These annotations move around, and I would like to animate their movement from one coordinate to another, but I'm not finding a way to do that.
I've tried using withAnimation { }
when setting my array of Identifiable models that back the Annotations, and I've tried adding the .animation(.default, annotationModels)
modifier to my Map object (where annotationModels
is the array that backs my Annotations).
The animation modifier doesn't work on Annotation structs, and it doesn't work if I add the animation modifier within the Annotation's view either.
Does anyone have any suggestions on how I might be able to animate the coordinates of annotations using a SwiftUI Map? Does the problem have to do with the fact that I have an array of these annotations?