moveCamera method

Future<void> moveCamera({
  1. double? bearing,
  2. required double latitude,
  3. required double longitude,
  4. double zoom = 18.0,
  5. double left = 0.0,
  6. double top = 0.0,
  7. double right = 0.0,
  8. double bottom = 0.0,
  9. bool animated = true,
})

move the camera with the given options

the padding option attributes are in percentage, it starts from 0.0 to 1.0

Implementation

Future<void> moveCamera({
  /// Direction that the camera is pointing in, in degrees clockwise from north.
  ///
  /// Range: 0° to < 360°
  /// 0° → North
  /// 90° → East
  /// 180° → South
  /// 270° → West
  /// null → move camera with current bearing
  double? bearing,
  required double latitude,
  required double longitude,
  double zoom = 18.0,
  double left = 0.0,
  double top = 0.0,
  double right = 0.0,
  double bottom = 0.0,

  /// Whether to animate the camera movement.
  /// true → animated transition (default)
  /// false → instant movement
  bool animated = true,
}) async {
  await _methodChannel.invokeMethod('moveCamera', {
    "bearing": bearing,
    "latitude": latitude,
    "longitude": longitude,
    "zoom": zoom,
    "left": left,
    "top": top,
    "right": right,
    "bottom": bottom,
    "animated": animated,
  });
}