setMapClickedListener method

Future<void> setMapClickedListener(
  1. OnMapClicked onMapClick
)

设置地图点击监听事件

Implementation

Future<void> setMapClickedListener(OnMapClicked onMapClick) async {
  return platform(
    android: (pool) async {
      final map = await _androidController.getMap();

      await map.setOnMapClickListener(
        _androidMapDelegate.._onMapClick = onMapClick,
      );

      pool..add(map);
    },
    ios: (pool) async {
      await _iosController.set_delegate(
        _iosMapDelegate.._onMapClick = onMapClick,
      );
    },
  );
}