implement annotation animations in MapLibreMapView

This commit is contained in:
Mauro Romito
2026-04-17 17:27:52 +02:00
committed by Mauro
parent 95b6e3244b
commit b0d7da383f
4 changed files with 135 additions and 2 deletions
@@ -129,7 +129,9 @@ struct MapLibreMapView: UIViewRepresentable {
let updatedAnnotation = updatedByID[id] else {
continue
}
existingAnnotation.coordinate = updatedAnnotation.coordinate
CoordinateAnimator.animate(annotation: existingAnnotation,
to: updatedAnnotation.coordinate,
duration: 1.0)
if let annotationView = mapView.view(for: existingAnnotation) as? LocationAnnotationView {
annotationView.updateContent(with: updatedAnnotation.kind, mediaProvider: mediaProvider)
}