setMapLanguage method

Future setMapLanguage(
  1. Language language
)

选择地图语言

Implementation

Future setMapLanguage(Language language) async {
  return platform(
    android: (pool) async {
      final map = await _androidController.getMap();
      switch (language) {
        case Language.Chinese:
          await map.setMapLanguage('zh_cn');
          break;
        case Language.English:
          await map.setMapLanguage('en');
          break;
      }

      pool..add(map);
    },
    ios: (pool) async {
      switch (language) {
        case Language.Chinese:
          await performSelectorWithObject(
              _iosController, 'setMapLanguage:', 0);
          break;
        case Language.English:
          await performSelectorWithObject(
              _iosController, 'setMapLanguage:', 1);
          break;
      }
    },
  );
}