I've been testing out the Map in SwiftUI, but there are some things I cannot figure out if it's possible or not.
I have a lot of MapAnnotations in the map, which represent vehicles. I update it's coordinate to reflect the current location for the vehicle. However:
-
When I update the coordinate for one vehicle, it seems like SwiftUI redraws all annotations and not only the one that has changed.
-
The vehicle annotation does indeed update it's location when I change the coordinate, but I cannot find a way to animate it? Now it just jumps to the next location. I guess that's related to the point above.
Any suggestion on how I could solve this? Or is the only way to use UIKit MapView?