来自DynamicSpeedInfo标签的实时TrafficSpeed信息

问题描述 投票:0回答:1

谁知道,我怎么能从这里的地图根据gps daten(lon,lat)再次获取DynamicSpeedInfo中的trafficSpeed数据。3个月前写这个URL就足够了:http://route.st.nlp.nokia.com/routing/6.2/getlinkinfo.json?waypoint=48.78388,9.17932&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg网址不再起作用。

但是现在我无法获得与此相同的信息:https://route.api.here.com/routing/7.2/getlinkinfo.json?app_id=K0VaGAJa47ncpNYZzPTg&app_code=Fh0hkL6zUv7SKjr7U3XXCA&linkAttributes=dynamicSpeedInfo&waypoint=geo!49.0210,8.4310&time=now

如果有人帮助我,我会很高兴。谢谢。下面是我需要的东西:

{“ Response”:{“ MetaInfo”:{“ MapVersion”:“ 2015Q4”,“ ModuleVersion”:“ 0.2”,“ InterfaceVersion”:“ 4.2”,“ Timestamp”:“” 2016-07-15T07:22: 08.892Z“},” Link“:[{” _ type“:” PrivateTransportLinkType“,” LinkId“:”-52889551“,” Shape“:[” 48.7840385,9.1789398“,” 48.7838593,9.1793499“],” SpeedLimit“: 13.89,“ DynamicSpeedInfo”:{“ TrafficSpeed”:7.5,“ TrafficTime”:4.8,“ BaseSpeed”:13.89,“ BaseTime”:2.6},“ Address”:{“ Label”:“ Arnulf-Klett-Platz,Schillerstraße” ,“国家”:“ DE”,“州”:“巴登-符腾堡”,“县”:“斯图加特”,“城市”:“斯图加特”,“区”:“米特”,“街道”:“ Arnulf-席勒大街(Killert-Platz)Schillerstraße“}}]}}

mapping real-time here-api
1个回答
0
投票

要获取实时交通流数据,例如您的48.78388,9.17932的速度请发送至HERE Traffic API:

https://traffic.api.here.com/traffic/6.2/flow.json?corridor=48.78387%2C9.17933%3B48.78407%2C9.17893%3B1&app_id=YOUR_APP_ID&app_code=YOUR_APP_CODE

对于以上请求,您至少需要有两个路标。如果您不知道第二个航路点,则可以从HERE Fleet Telematics API获取它以发送关注请求:

https://fleet.api.here.com/2/calculateroute.json?routeMatch=1&mode=fastest;car;traffic:disabled&app_id=YOUR_APP_ID&app_code=YOUR_APP_CODE&waypoint0=48.78388,9.17932&attributes=ROAD_GEOM_FCn(*)

在ROAD_GEOM_FCN下上述请求的响应中,您可以获取链接道路几何图形(沿多段线[10 ^ -5度WGS84]。逗号分隔。每个值都相对于前一个。]

LAT:“ 4878387,20”

LON:“ 917933,-40”

然后第一个坐标是48.78387,9.17933

第二个是:

((4878387 + 20)/ 100000 = 48.78407

((917933 +(-40))/ 100000 = 9.17893

您可以看到这些坐标已在Traffic API请求中使用。

Traffic API example/documentation

Fleet API example/documentation

© www.soinside.com 2019 - 2024. All rights reserved.