setMarkerClickedListener method

Future<void> setMarkerClickedListener(
  1. OnMarkerClicked onMarkerClicked
)

设置marker点击监听事件

Implementation

Future<void> setMarkerClickedListener(OnMarkerClicked onMarkerClicked) async {
  await platform(
    android: (pool) async {
      final map = await androidController.getMap();

      await map.setOnMarkerClickListener(
          _androidMapDelegate.._onMarkerClicked = onMarkerClicked);

      pool..add(map);
    },
    ios: (pool) async {
      await iosController
          .set_delegate(_iosMapDelegate.._onMarkerClicked = onMarkerClicked);
    },
  );
}