Weird arrivals and distances in api output POST tour


#1

hi, i’m posting locations to the API to get an optimized tour. Bute the arrival times and distances are totally wrong.
i do the geocoding via the webfleet service. All addresses are within the same city but the arrival time of the second location is 181105min?

so whats wrong here?

regards and thanks in advance

the array i post to your API looks like this:

    Array
(
    [0] => Array
        (
            [name] => start
            [lat] => 53572270
            [lng] => 9989330
         (
    [1] => Array
            (
                [name] => 63956
                [lat] => 53548639
                [lng] => 10027340
            )

    [2] => Array
        (
            [name] => 63960
            [lat] => 53489449
            [lng] => 10207069
        )

    [3] => Array
        (
            [name] => 63957
            [lat] => 53552990
            [lng] => 10045759
        )

    [4] => Array
        (
            [name] => end
            [lat] => 53604619
            [lng] => 10023880
        )

)

here is the response

            stdClass Object
(
    [id] => hMx061J7
    [count] => 5
    [feasible] => 1
    [route] => stdClass Object
        (
            [0] => stdClass Object
                (
                    [name] => start
                    [arrival] => 0
                    [distance] => 0
                )
            [1] => stdClass Object
                    (
                        [name] => 63957
                        [arrival] => 181105
                        [distance] => 15092
                    )

            [2] => stdClass Object
                (
                    [name] => 63960
                    [arrival] => 407996
                    [distance] => 33999.7
                )

            [3] => stdClass Object
                (
                    [name] => 63956
                    [arrival] => 618797
                    [distance] => 51566.4
                )

            [4] => stdClass Object
                (
                    [name] => end
                    [arrival] => 831413
                    [distance] => 69284.4
                )

        )

)

#2

The WEBFLEET API returns geocoding results in micro degrees. You should divide the result by 1e6 (1 million) before you send it to our API.


#3

ok, that’s way better. thanks.