osrmdistance-matrix

OSRM Table API not returning distance


I am trying to get the distance matrix for my desired locations. As mentioned in the OSRM-Table Service docs, I have tried modifying the same as http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219&annotations=distance. Response is showing error as:

{ "message": "Coordinate is invalid: 13.397634,52.529407&annotations=distance,duration", "code": "InvalidInput" }

but, when I run it without annotations, then I am able to get the proper response.

{
    "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"
}

The problem here is I don't have distance matrix in it. Can anyone please suggest the cause or how to solve it?


Solution

  • It seems there is currently a problem with the osrm demo service. Check the issues below: