如何在此处获得限速 API
How to get SpeedLimit in HERE API
我正在开发一个网络应用程序,我需要知道特定道路的速度限制。
对 API 的调用看起来是这样的:
$.get('http://cre.api.here.com/2/calculateroute.json',
'waypoint0=41.69758,-87.78397&waypoint1=41.70056,-87.77429&mode=fastest;car;&overlays=OVERLAYEXAMPLE1&storage=readonly&linkAttributes=speedLimit&app_id=XXX&app_code=YYY',
function(data) {
console.log(data.response);
}
);
我收到的回复不包含 "speedLimit" 即使我明确请求也是如此。
Note: All link info attributes are subject to additional licensing. We reserve the right to require authorization on API level for all or individual attributes with future releases. Currently, only the SpeedLimit attribute requires authorization and the attribute is not included in LinkInfo if the client application is not authorized to receive this information.
客户说该应用程序已获得授权,因此应该没有问题..但无论如何我没有收到包含速度限制的所需结果集..
我做错了什么?
您必须使用 legattributes=li 来获取 link 的 speedLimit 属性。
下面是关于如何获得 links(道路)限速的示例。
https://route.cit.api.here.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&app_code=xxx&app_id=xxxx
我正在开发一个网络应用程序,我需要知道特定道路的速度限制。 对 API 的调用看起来是这样的:
$.get('http://cre.api.here.com/2/calculateroute.json',
'waypoint0=41.69758,-87.78397&waypoint1=41.70056,-87.77429&mode=fastest;car;&overlays=OVERLAYEXAMPLE1&storage=readonly&linkAttributes=speedLimit&app_id=XXX&app_code=YYY',
function(data) {
console.log(data.response);
}
);
我收到的回复不包含 "speedLimit" 即使我明确请求也是如此。
Note: All link info attributes are subject to additional licensing. We reserve the right to require authorization on API level for all or individual attributes with future releases. Currently, only the SpeedLimit attribute requires authorization and the attribute is not included in LinkInfo if the client application is not authorized to receive this information.
客户说该应用程序已获得授权,因此应该没有问题..但无论如何我没有收到包含速度限制的所需结果集..
我做错了什么?
您必须使用 legattributes=li 来获取 link 的 speedLimit 属性。
下面是关于如何获得 links(道路)限速的示例。
https://route.cit.api.here.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&app_code=xxx&app_id=xxxx