File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,24 @@ extension AppleMapController: AnnotationDelegate {
206
206
207
207
private func updateAnnotation( annotation: FlutterAnnotation ) {
208
208
if self . annotationExists ( with: annotation. id) {
209
+ let oldAnnotation = self . getAnnotation ( with: annotation. id)
210
+
211
+
209
212
UIView . animate ( withDuration: 0.32 , animations: {
210
- let oldAnnotation = self . getAnnotation ( with: annotation. id)
211
213
oldAnnotation? . coordinate = annotation. coordinate
214
+ oldAnnotation? . zIndex = annotation. zIndex
215
+ oldAnnotation? . anchor = annotation. anchor
216
+ oldAnnotation? . alpha = annotation. alpha
217
+ oldAnnotation? . isVisible = annotation. isVisible
212
218
oldAnnotation? . title = annotation. title
219
+ oldAnnotation? . subtitle = annotation. subtitle
213
220
} )
221
+
222
+ // Update the annotation view with the new image
223
+ if let view = self . mapView. view ( for: oldAnnotation!) {
224
+ let newAnnotationView = getAnnotationView ( annotation: annotation)
225
+ view. image = newAnnotationView. image
226
+ }
214
227
}
215
228
}
216
229
You can’t perform that action at this time.
0 commit comments