0

只是一个简单的问题。您可以为 HERE 地图卫星视图选择不同的语言吗?在文档内部有一个示例,您可以在创建默认图层时指定 lg 属性。只要我使用 vector.normal.map 图层,它就可以正常工作,但是如果我切换到卫星视图,它将不会使用选定的语言。这是我从文档中获取的示例。

function switchMapLanguage(map, platform){
  // Create default layers
  let defaultLayers = platform.createDefaultLayers({
    lg: 'zh'
  });
  // Set the normal map variant of the vector map type
  map.setBaseLayer(defaultLayers.vector.normal.map);

  // Display default UI components on the map and change default
  // language to simplified Chinese.
  // Besides supported language codes you can also specify your custom translation
  // using H.ui.i18n.Localization.
  var ui = H.ui.UI.createDefault(map, defaultLayers, 'zh-CN');

  // Remove not needed settings control
  ui.removeControl('mapsettings');
}
4

0 回答 0