zoomIn method

Future zoomIn(
  1. {bool animated = true}
)

放大一个等级

Implementation

Future zoomIn({bool animated = true}) {
  return platform(
    android: (pool) async {
      final map = await _androidController.getMap();
      final cameraUpdate =
          await com_amap_api_maps_CameraUpdateFactory.zoomIn();
      if (animated) {
        await map.animateCamera(cameraUpdate);
      } else {
        await map.moveCamera(cameraUpdate);
      }

      pool..add(map)..add(cameraUpdate);
    },
    ios: (pool) async {
      final currentLevel = await _iosController.get_zoomLevel();
      await _iosController.setZoomLevelAnimated(currentLevel + 1, animated);
    },
  );
}