updateCamera method

Future<CommandCompletion> updateCamera(
  1. CameraUpdate update
)

Moves the camera, at once or with an animation.

Camera fields that update doesn't set keep their values, and the update stops any running animation of the fields it sets. The function finishes when the map applies the update, before an animation ends. To learn when an animation ends, set an CameraTransitionHandler in its animation options.

See mln_map_update_camera in the C API reference.

Implementation

Future<CommandCompletion> updateCamera(CameraUpdate update) =>
    _command((arena, completion) {
      final registrations = _NativeRegistrations(_callbackRoots);
      return registrations.run(
        () => raw.mln_map_update_camera(
          _handle.raw,
          _writeCameraUpdate(update, arena, registrations),
          completion,
          nativeDiagnostic,
        ),
      );
    });