moveTo abstract method

void moveTo(
  1. Camera camera,
  2. int duration,
  3. AnimationType animationType,
  4. CameraCallback callback,
)

Moves the map camera to a new position with a smooth pan-and-zoom animation. camera The new camera position Camera. duration Animation duration in milliseconds (-1 for default duration). animationType The type of easing animation AnimationType. callback Callback to execute when the animation completes CameraCallback.

Example:

// Move to position with linear animation
Point targetPoint = Point(200.0, 300.0);
Camera targetCamera = Camera(targetPoint, 100.0, 90.0, 0.0);
CameraCallback callback = CameraCallback(
 onMoveFinished: (completed) {
   print("Move to with linear animation ${completed ? 'completed' : 'cancelled'}");
 },
);
_locationWindow!.moveTo(targetCamera, 1500, AnimationType.LINEAR, callback);
print("Started move to with linear animation");

Implementation

void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback);