OSRM Table API 未返回距离
OSRM Table API not returning distance
我正在尝试获取所需位置的距离矩阵。正如OSRM-Table服务docs中提到的,我试过修改与http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219&annotations=distance
相同的内容。
响应显示错误为:
{
"message": "Coordinate is invalid: 13.397634,52.529407&annotations=distance,duration",
"code": "InvalidInput"
}
但是,当我 运行 它没有 annotations
时,我就能得到正确的响应。
{
"durations": [
[
0,
723.9,
711
],
[
419.8,
0,
541.6
],
[
565,
416,
0
]
],
"destinations": [
{
"hint": "g5HFiBCSxYgiAAAA6gIAAAAAAAAAAAAASjFaQU1xpUEAAAAAAAAAACIAAADqAgAAAAAAAAAAAADppQAA_kvMAKlYIQM8TMwArVghAwAA7wqVP7a9",
"distance": 4.231665624816857,
"name": "Friedrichstraße",
"location": [
13.388798,
52.517033
]
},
{
"hint": "0BgegNQVzIgMAAAADAAAAAAAAAACAQAAW7-PQOKcyEAAAAAApq6DQgwAAAAMAAAAAAAAAIoAAADppQAAf27MABiJIQOCbswA_4ghAwAAXwWVP7a9",
"distance": 2.7893928415656375,
"name": "Torstraße",
"location": [
13.397631,
52.529432
]
},
{
"hint": "xRcegP___38kAAAAyAAAAC0AAABKAAAAsowKQkpQX0Lx6yZCvsQGQiQAAABkAAAALQAAACUAAADppQAASufMAOdwIQNL58wA03AhAwMAvxCVP7a9",
"distance": 2.2265954222656257,
"name": "Platz der Vereinten Nationen",
"location": [
13.428554,
52.523239
]
}
],
"sources": [
{
"hint": "g5HFiBCSxYgiAAAA6gIAAAAAAAAAAAAASjFaQU1xpUEAAAAAAAAAACIAAADqAgAAAAAAAAAAAADppQAA_kvMAKlYIQM8TMwArVghAwAA7wqVP7a9",
"distance": 4.231665624816857,
"name": "Friedrichstraße",
"location": [
13.388798,
52.517033
]
},
{
"hint": "0BgegNQVzIgMAAAADAAAAAAAAAACAQAAW7-PQOKcyEAAAAAApq6DQgwAAAAMAAAAAAAAAIoAAADppQAAf27MABiJIQOCbswA_4ghAwAAXwWVP7a9",
"distance": 2.7893928415656375,
"name": "Torstraße",
"location": [
13.397631,
52.529432
]
},
{
"hint": "xRcegP___38kAAAAyAAAAC0AAABKAAAAsowKQkpQX0Lx6yZCvsQGQiQAAABkAAAALQAAACUAAADppQAASufMAOdwIQNL58wA03AhAwMAvxCVP7a9",
"distance": 2.2265954222656257,
"name": "Platz der Vereinten Nationen",
"location": [
13.428554,
52.523239
]
}
],
"code": "Ok"
}
这里的问题是我没有距离矩阵。任何人都可以提出原因或解决方法吗?
osrm 演示服务目前似乎有问题。检查以下问题:
我正在尝试获取所需位置的距离矩阵。正如OSRM-Table服务docs中提到的,我试过修改与http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219&annotations=distance
相同的内容。
响应显示错误为:
{ "message": "Coordinate is invalid: 13.397634,52.529407&annotations=distance,duration", "code": "InvalidInput" }
但是,当我 运行 它没有 annotations
时,我就能得到正确的响应。
{
"durations": [
[
0,
723.9,
711
],
[
419.8,
0,
541.6
],
[
565,
416,
0
]
],
"destinations": [
{
"hint": "g5HFiBCSxYgiAAAA6gIAAAAAAAAAAAAASjFaQU1xpUEAAAAAAAAAACIAAADqAgAAAAAAAAAAAADppQAA_kvMAKlYIQM8TMwArVghAwAA7wqVP7a9",
"distance": 4.231665624816857,
"name": "Friedrichstraße",
"location": [
13.388798,
52.517033
]
},
{
"hint": "0BgegNQVzIgMAAAADAAAAAAAAAACAQAAW7-PQOKcyEAAAAAApq6DQgwAAAAMAAAAAAAAAIoAAADppQAAf27MABiJIQOCbswA_4ghAwAAXwWVP7a9",
"distance": 2.7893928415656375,
"name": "Torstraße",
"location": [
13.397631,
52.529432
]
},
{
"hint": "xRcegP___38kAAAAyAAAAC0AAABKAAAAsowKQkpQX0Lx6yZCvsQGQiQAAABkAAAALQAAACUAAADppQAASufMAOdwIQNL58wA03AhAwMAvxCVP7a9",
"distance": 2.2265954222656257,
"name": "Platz der Vereinten Nationen",
"location": [
13.428554,
52.523239
]
}
],
"sources": [
{
"hint": "g5HFiBCSxYgiAAAA6gIAAAAAAAAAAAAASjFaQU1xpUEAAAAAAAAAACIAAADqAgAAAAAAAAAAAADppQAA_kvMAKlYIQM8TMwArVghAwAA7wqVP7a9",
"distance": 4.231665624816857,
"name": "Friedrichstraße",
"location": [
13.388798,
52.517033
]
},
{
"hint": "0BgegNQVzIgMAAAADAAAAAAAAAACAQAAW7-PQOKcyEAAAAAApq6DQgwAAAAMAAAAAAAAAIoAAADppQAAf27MABiJIQOCbswA_4ghAwAAXwWVP7a9",
"distance": 2.7893928415656375,
"name": "Torstraße",
"location": [
13.397631,
52.529432
]
},
{
"hint": "xRcegP___38kAAAAyAAAAC0AAABKAAAAsowKQkpQX0Lx6yZCvsQGQiQAAABkAAAALQAAACUAAADppQAASufMAOdwIQNL58wA03AhAwMAvxCVP7a9",
"distance": 2.2265954222656257,
"name": "Platz der Vereinten Nationen",
"location": [
13.428554,
52.523239
]
}
],
"code": "Ok"
}
这里的问题是我没有距离矩阵。任何人都可以提出原因或解决方法吗?
osrm 演示服务目前似乎有问题。检查以下问题: