问题描述
我正在使用此示例生成从A到B的路线。
https://developer.here.com/documentation/examples/maps-js/services/map-with-route-from-a-to-b
但是我找不到改变说明语言(葡萄牙语)的方法。
有人可以帮我吗?
解决方法
在路线请求中,您可以传递language参数。对于语言,您有两种选择:葡萄牙语-巴西,可以用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'
};