这里的地图:给出正确的街道方向的指示 [英] HERE Maps: Give directions to correct side of the street
问题描述
有时在计算路线时,车辆似乎会被引导到错误的街道上.
我知道我们可以在最终目的地之前指定通过航路点.对于我们来说,这确实不是一个选择,因为我们不知道车辆来自哪个方向.
是否有其他方法可以做到这一点?
有人告诉我问题发生在这两个纬度/经度上.
开始位置:42.343763,-71.115977结束位置:42.342545,-71.121875
删除了片段句.
您可以使用
您可以通过更改其前缀来更改链接遍历的方向.例如,将 -948669856
更改为 +948669856
可为您提供较短的原始路线,公交车朝西北方向行驶,目的地位于道路的左侧.
请注意,您可以使用 Geocoder API .链接ID是< Result>
中< MapReference>
下的< ReferenceID>
.
Occasionally when calculating a route it seems the vehicle ends being directed to the wrong side of the street.
I realize we can specify pass through waypoints before the final destination. This really isn't an option for us since we don't know from which direction the vehicle will be coming from.
Is there an alternative way to do this?
EDIT: I was told the issue occurred with these two lat/lons.
Start Location: 42.343763, -71.115977 End Location: 42.342545, -71.121875
EDIT: removed fragment sentence.
You can use NavigationWaypointParameter with LinkPositions to set a direction you want to drive through a certain waypoint. For example:
https://route.api.here.com/routing/7.2/calculateroute.json?
app_code={app_code}
&app_id={app_id}
&mode=fastest;car
&waypoint0=link!-22020941
&waypoint1=link!-948669856
This should give you the route you are looking for, with the bus heading towards the south-east with the destination on its right.
You can change the direction of the link traversal by changing it's prefix. For example, changing -948669856
to +948669856
gives you the original, shorter route, with the bus heading north-west and the destination on the left side of the road.
Note that you can get the link ids through reverse geocoding using the Geocoder API. The link id is the <ReferenceID>
under <MapReference>
in the <Result>
.
这篇关于这里的地图:给出正确的街道方向的指示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!