如何在 MapViewLite View 上将 Here 地图语言设置为英语?在印度它会自动更改为印地语

How to set Here map language to English on MapViewLite View? It automatically changes to Hindi in India

我正在开发一个使用 Here Map Lite Android SDK 的应用程序。当我放大到钦奈(印度)以自动将语言更改为印地语时。如何将其更改为英文

private fun loadMapScene() {
        if (checkPermission())
            mapView.mapScene.loadScene(MapStyle.NORMAL_DAY) {
                if (it == null) {
                    mapView.camera.target = GeoCoordinates(52.530932, 13.384915)
                    mapView.camera.zoomLevel = 14.0
                } else {
                    Log.d(_errTAG, "loadMapScene failed: $it")
                }
            }
        else requestPermission()
    }

Screenshot

您可以使用继承自 class 的语言代码设置语言 java.lang.Enum<LanguageCode>。在这里查看更多

https://developer.here.com/documentation/android-sdk/api_reference/com/here/sdk/core/LanguageCode.html#AS_IN

这从版本 4.1.6 开始工作

private void loadMapScene() {
      MapSceneConfig mapSceneConfig = new MapSceneConfig();
      mapSceneConfig.mainLanguageCode = LanguageCode.EN_EN;
      mapSceneConfig.fallbackLanguageCode = LanguageCode.EN_EN;

mapView.getMapScene().loadScene(MapStyle.NORMAL_DAY, mapSceneConfig, new MapScene.LoadSceneCallback() {
    @Override
    public void onLoadScene(@Nullable MapScene.ErrorCode errorCode) {
        if (errorCode == null) {
            mapView.camera.target = GeoCoordinates(52.530932, 13.384915);
                mapView.camera.zoomLevel = 14.0;
        } else {
            Log.d(TAG, "onLoadScene failed: " + errorCode.toString());
        }
    }
});
}