javascript - 如何更改 Here Maps Js api 中路由指令的语言?
问题描述
我正在使用此示例生成从 A 到 B 的路线。
https://developer.here.com/documentation/examples/maps-js/services/map-with-route-from-a-to-b
但是我找不到更改说明语言(葡萄牙语)的方法。
有人能帮我吗?
解决方案
在您的路由请求中,您可以传入语言参数。对于语言,您有两种选择:可以使用 指定的葡萄牙语 - 巴西pt-br
,或者可以使用 指定的葡萄牙语 - 葡萄牙pt-pt
:
routeRequestParams = {
routingMode: 'fast',
lang: 'pt-br',
transportMode: 'car',
origin: '52.5160,13.3779', // Brandenburg Gate
destination: '52.5206,13.3862', // Friedrichstraße Railway Station
return: 'polyline,turnByTurnActions,actions,instructions,travelSummary'
};
推荐阅读
- google-chrome - 修改 Chrome 扩展中的响应标头
- python - Opencv如何在掩码内应用过滤器
- javascript - 运行 gulp 命令时出现 Microsoft JScript 运行时错误
- javascript - 减少 select2 下拉列表中的选择列表(搜索时)
- chromecast - 第三方操作可以调用 chromecast 应用程序吗?
- python - 为什么我用来从谷歌新闻语料库(英语)加载预训练 word2vec 的代码无法加载谷歌新闻语料库(印度尼西亚语)?
- acumatica - 机会屏幕中的焦点选项卡
- r - 合并具有相同名称的列表列表的元素
- amazon-web-services - 通过 CodeBuild 在 AWS Lambda 上安装 NLTK/WORDNET
- hyperledger-fabric - Fabric - 数据加密