【问题标题】:Speed limit for multiple locations using HERE API使用 HERE API 的多个位置的速度限制
【发布时间】:2020-02-14 19:42:49
【问题描述】:

我需要知道车辆行程中某些坐标的限速。 如果我执行 POST 请求,例如:

https://fleet.cit.api.here.com/2/calculateroute.json?routeMatch=1&mode=car&attributes=SPEED_LIMITS_FCn(*)&&app_id=APP_ID&app_code=APP_CODE

with body:
LATITUDE,LONGITUDE
37.401996,-122.041338
37.416438,-122.086022

我收到了带有很多坐标的回建路线。 但我只对两个坐标感兴趣...... 有没有更好的方法来获得几个(~10-100)坐标的速度限制?

【问题讨论】:

    标签: here-api here-maps-rest


    【解决方案1】:

    这将获得一个链接数组,如果地图数据中存在速度限制,则会为该链接返回它。 linkAttributes 和 routeAttributes 会限制参数的响应。但是不能限制默认响应。

    https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey=xxx&waypoint0=42.4065,-113.3798&waypoint1=42.2821,-83.74847&mode=fastest;car&inkAttributes=speedLimit,dynamicSpeedInfo&legAttributes=links

    速度信息可以通过地理编码器 API 以速度类别的形式出现,如下所示,将基于地址位置。

    https://geocoder.ls.hereapi.com/6.2/geocode.json?searchtext=Castro%20St%20Mountain%20View%20Santa%20Clara%20US&gen=9&apiKey=xxxxx&locationattributes=li

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-08
      • 2012-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多