如何在这里API获得SpeedLimit

如何在这里API获得SpeedLimit

本文介绍了如何在这里API获得SpeedLimit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在开发一个Web应用程序,我需要了解特定道路的速度限制.对API的调用看起来像是这样:

I'm developing a web app where I need to know speed limit of specific road.The call to API looks lie this:

$.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".

The response I'm receiving does not contain "speedLimit" even when I'm explicitly requesting.

我在文档中发现:>: //developer.here.com/documentation/geocoder/topics/resource-type-response-geocode.html#resource-type-response-geocode__link-info

客户说该应用程序已获得授权,因此它不会有任何问题..但是无论如何我都没有收到包含速度限制的期望结果集.

Client says the app is authorized, so no issues should be with it.. but anyways I'm not receiving desired result-set which contains speed limit..

我做错了什么?

推荐答案

您必须使用legattributes = li来获取链接的speedLimit属性.

You have to use legattributes=li to get speedLimit attribute of a link.

以下是有关如何获得路段(道路)限速的示例.

Below is an example on how to get speedlimit for links(roads).

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获得SpeedLimit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 00:21