在 PDE(平台数据扩展)中找不到路由的 HERE LinkId

HERE LinkId from route not found in PDE (Platform Data Extension)

更新:它又发生了,还有 Fleet API。请参阅 post.

末尾的其他示例

我正在使用 HERE 的 REST API 计算路线,然后通过查询 HERE 的平台数据扩展 (PDE) 为每个 link/路线段请求额外数据。这通常工作正常,但现在我已经 运行 进入 PDE 无法识别的 link id。

是这些服务不同步,还是我做错了什么?

过去几周我没有遇到任何问题,它对大多数 link id 仍然有效,所以这可能是一个新问题,也可能是一个非常单一的问题。我在 HERE API 文档和 Whosebug 上进行了搜索,但找不到任何相关内容。

路线请求(A24 柏林往汉堡):https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!52.7091,13.0356&waypoint1=geo!52.7193,12.9608&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy

json 响应(下方)包含一个 link,其永久 ID 1199057935 在 Anschlussstelle Kremmen。

PDE 请求给出空响应:https://pde.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1199057935&app_id=xxx&app_code=yyy

{"Layers":[]}

相反,我希望包含图块的数据,例如我得到的是 1199057936

{"Layers":[{"layer":"ROAD_GEOM_FC1","level":9,"tileXYs":[{"x":548,"y":405}]}]}

我还尝试了使用 ROAD_GEOM_FC1 的 PDE 请求,并在 ID 前加上 + (values=+1199057935)。其他 link 路线的 ID return 预期的图块信息。

为了完整起见,这里是来自路由响应的 link 的 json:

{
 "linkId":"+1199057935",
 "shape":["52.7175629,12.976613","52.7177131,12.9749393"],
 "firstPoint":28,
 "lastPoint":29,
 "length":114,
 "remainDistance":1095,
 "remainTime":39,
 "nextLink":"+1199057936",
 "maneuver":"M2",
 "speedLimit":33.3333359,
 "dynamicSpeedInfo":{"trafficSpeed":16.3888893,"trafficTime":7,"baseSpeed":27.5,"baseTime":4,"jamFactor":5.7118645},
 "flags":["motorway"],
 "functionalClass":1,
 "roadNumber":"A24",
 "timezone":"+0100",
 "roadName":"",
 "consumption":0,
 "_type":"PrivateTransportLinkType"
}

更新 2019-05-27:

我从 https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!52.5066,13.4299&waypoint1=geo!52.5282,13.4265&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy

得到一条包含 link id 1239826684 的路线

使用队列端点重定向到与上述相同的调用,包括 link id 1239826684:https://fleet.api.here.com/2/calculateroute.json?waypoint0=geo!52.5066,13.4299&waypoint1=geo!52.5282,13.4265&mode=fastest;car;traffic:disabled&representation=navigation&app_id=xxx&app_code=yyy

PDE returns [] link id: https://pde.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1239826684&app_id=xxx&app_code=yyy

舰队 API returns [] link id: http://fleet.cit.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1239826684&app_id=xxx&app_code=yyy

似乎基础地理数据不同步,使用不同的 APIs 也无济于事。还有其他解决方案吗?

您可以尝试 API 的 Fleet telematics 组的基本路由和 PDE,因为 Fleet Telematics 提供了完整的路由解决方案。

请找到下面的 API 请求,它给出了 id-1199057935

的预期响应

http://fleet.cit.api.here.com/1/index.json?layer=ROAD_GEOM_FCn&attributes=LINK_ID&values=1199057935&app_id=xxxx&app_code=yyyy

回应: { 图层:[ { 图层:"ROAD_GEOM_FC1", 等级:9, tileXYs:[ { ×:548, 是:405 } ] } ] }

有关更多信息,请阅读以下文档

https://developer.here.com/documentation/fleet-telematics/api-reference.html#operation%2FindexJSONUsingGET

希望这会有所帮助。