这里映射REST API - getlinkinfo返回不正确的速度限制

时间:2014-04-02 19:24:45

标签: api rest here-api

我一直在使用getlinkinfo命令来查看速度限制。 API返回的值相对于我社区道路上的公布速度限制减少了3.6倍。例如,这里是加拿大NB州弗雷德里克顿101号公路路段的请求,其限速为90公里/小时:

http://route.st.nlp.nokia.com/routing/6.2/getlinkinfo.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&waypoint=45.921339,-66.666753&linkattributes=sc,sl

(短链接 - http://goo.gl/EWfKDe

This request returns a speed limit of "25" and the actual posted speed limit is 90. Can you tell me why the <SpeedLimit> values do not contain the actual posted speed limit?  Is it because I am using the "DemoAppId"?

伯尼。

1 个答案:

答案 0 :(得分:9)

speedLimit元素始终以 m / s 返回,因此您需要使用转换因子来获取典型的道路标志单位。 km / h 乘以3.6, mph 乘以2.23。如果缺少speedLimit元素,则适用国家速度限制。

为什么选择 m / s 你可能会问?我认为这样做是为了通过在HERE平台上始终使用最小距离单位(米)和最小时间单位(秒)来避免计算中的舍入误差。我假设在计算路线时使用getlinkinfo下面的数据。

可以在GitHub上的HERE Maps社区示例中找到working example