easeCamera method

  1. @override
Future<bool?> easeCamera(
  1. CameraUpdate cameraUpdate
)
override

Implementation

@override
Future<bool?> easeCamera(CameraUpdate cameraUpdate) async {
  final cameraOptions = Convert.toCameraOptions(cameraUpdate, _map).jsObject;

  final around = getProperty(cameraOptions, 'around');
  final bearing = getProperty(cameraOptions, 'bearing');
  final center = getProperty(cameraOptions, 'center');
  final pitch = getProperty(cameraOptions, 'pitch');
  final zoom = getProperty(cameraOptions, 'zoom');

  _map.flyTo({
    if (around != null) 'around': around,
    if (bearing != null) 'bearing': bearing,
    if (center != null) 'center': center,
    if (pitch != null) 'pitch': pitch,
    if (zoom != null) 'zoom': zoom,
    // if (duration != null) 'duration': duration.inMilliseconds,
  });

  return true;
}