showLocateControl method

Future showLocateControl(
  1. bool enable
)

显示定位按钮

Implementation

Future showLocateControl(bool enable) {
  return platform(
    android: (pool) async {
      final map = await _androidController.getMap();
      final uiSetting = await map.getUiSettings();
      await uiSetting.setMyLocationButtonEnabled(enable);

      pool..add(map)..add(uiSetting);
    },
    ios: (pool) async {
      print('ios端不支持显示定位按钮');
    },
  );
}