Skip to content

Commit 1a6ee7b

Browse files
ateichLuisThein
authored andcommitted
fix: Updated mapController.moveCamera to not animate
To match the API of google_maps_flutter, updated mapController.moveCamera to move the camera without animating the transition. To animate camera movement, mapController.animateCamera should be used instead. Fixes #31
1 parent 87289d5 commit 1a6ee7b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ios/Classes/MapView/AppleMapController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ public class AppleMapController: NSObject, FlutterPlatformView {
229229
let positionData :Dictionary<String, Any> = self.toPositionData(data: args["cameraUpdate"] as! Array<Any>, animated: true)
230230
if !positionData.isEmpty {
231231
guard let _ = positionData["moveToBounds"] else {
232-
self.mapView.setCenterCoordinate(positionData, animated: true)
232+
self.mapView.setCenterCoordinate(positionData, animated: false)
233233
return
234234
}
235-
self.mapView.setBounds(positionData, animated: true)
235+
self.mapView.setBounds(positionData, animated: false)
236236
}
237237
}
238238

lib/src/controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class AppleMapController {
194194
<String, String>{'annotationId': annotationId.value});
195195
}
196196

197-
/// Changes the map camera position.
197+
/// Changes the map camera position without animating the transition.
198198
///
199199
/// The returned [Future] completes after the change has been made on the
200200
/// platform side.

0 commit comments

Comments
 (0)