为什么我从 HERE 路线 API 和 HERE 地图网站收到不同的结果?
Why am i receiving different results from the HERE Routing API and the HERE Maps Website?
我们正在使用路由 API V8。当我调用 API 时。我得到 return 结果
2021-03-03T18:09:52+10:00
但来自地图网站。我得到的结果是 https://wego.here.com/directions/mix/6-Kyabra-St,-Newstead-QLD-4006,-Australia:-27.45264,153.04265/35-Hercules-St,-Hamilton-QLD-4007,-Australia:-27.43945,153.06973?map=-27.44536,153.05502,15,normal
它说需要 12 分钟的旅行时间。
这是我的 API 电话:https://router.hereapi.com/v8/routes?transportMode=car&origin=-27.452630,153.042350&destination=-27.439750,153.069630&departureTime=2021-03-03T08:00:00Z&apiKey=
以下是 API 的完整回复:
{"routes":[{"id":"3ff8ffc9-1f66-4b47-9ec0-a59cf2268348","sections":[{"id":"e4154bf2-2052-4846-b46c-5cfe4b4cfc01","type":"vehicle","departure":{"time":"2021-03-03T18:00:00+10:00","place":{"type":"place","location":{"lat":-27.4526753,"lng":153.0426484},"originalLocation":{"lat":-27.45263,"lng":153.0423499}}},"arrival":{"time":"2021-03-03T18:09:52+10:00","place":{"type":"place","location":{"lat":-27.4396845,"lng":153.0693942},"originalLocation":{"lat":-27.4397501,"lng":153.06963}}},"transport":{"mode":"car"}}]}]}
基于 HERE routing API v8 documentation,当我从 departureTime
参数的末尾删除 Z
以假设时间是原点的本地时间时,时间显示正确:
....
departure": {
"time": "2021-03-03T08:00:00+10:00",
....
arrival": {
"time": "2021-03-03T08:10:20+10:00",
...
我们正在使用路由 API V8。当我调用 API 时。我得到 return 结果
2021-03-03T18:09:52+10:00
但来自地图网站。我得到的结果是 https://wego.here.com/directions/mix/6-Kyabra-St,-Newstead-QLD-4006,-Australia:-27.45264,153.04265/35-Hercules-St,-Hamilton-QLD-4007,-Australia:-27.43945,153.06973?map=-27.44536,153.05502,15,normal
它说需要 12 分钟的旅行时间。
这是我的 API 电话:https://router.hereapi.com/v8/routes?transportMode=car&origin=-27.452630,153.042350&destination=-27.439750,153.069630&departureTime=2021-03-03T08:00:00Z&apiKey=
以下是 API 的完整回复:
{"routes":[{"id":"3ff8ffc9-1f66-4b47-9ec0-a59cf2268348","sections":[{"id":"e4154bf2-2052-4846-b46c-5cfe4b4cfc01","type":"vehicle","departure":{"time":"2021-03-03T18:00:00+10:00","place":{"type":"place","location":{"lat":-27.4526753,"lng":153.0426484},"originalLocation":{"lat":-27.45263,"lng":153.0423499}}},"arrival":{"time":"2021-03-03T18:09:52+10:00","place":{"type":"place","location":{"lat":-27.4396845,"lng":153.0693942},"originalLocation":{"lat":-27.4397501,"lng":153.06963}}},"transport":{"mode":"car"}}]}]}
基于 HERE routing API v8 documentation,当我从 departureTime
参数的末尾删除 Z
以假设时间是原点的本地时间时,时间显示正确:
....
departure": {
"time": "2021-03-03T08:00:00+10:00",
....
arrival": {
"time": "2021-03-03T08:10:20+10:00",
...