setCameraViewFitMode method

  1. @override
Future<void> setCameraViewFitMode(
  1. MPCameraViewFitMode mpCameraViewFitMode
)
override

Implementation

@override
Future<void> setCameraViewFitMode(MPCameraViewFitMode mpCameraViewFitMode) {
  late int cameraFitMode;
  switch (mpCameraViewFitMode) {
    case MPCameraViewFitMode.northAligned:
      cameraFitMode = 0;
      break;
    case MPCameraViewFitMode.firstStepAligned:
      cameraFitMode = 1;
      break;
    case MPCameraViewFitMode.startToEndAligned:
      cameraFitMode = 2;
      break;
    case MPCameraViewFitMode.none:
      cameraFitMode = 3;
      break;
  }
  return directionsRendererMethodChannel.invokeMethod(
      'DRE_setCameraViewFitMode', {"cameraFitMode": cameraFitMode});
}