api.automapa.comv3 - все системы работают

Рассчитать маршрут

Routes.route

Строит маршрут через упорядоченный список GPS-точек. Опционально маневры, traffic, платные дороги и грузовые ограничения.

POST/v3/Routes/routeapi.automapa.com

Параметры body

Тело запросаТипОписание
pointsdouble[][] ОБЯЗАТЕЛЬНОOrdered list of [x, y] coordinates.
routeobject ОБЯЗАТЕЛЬНОRoute options.
startstring"YYYY-MM-DD HH:MM" or "NOW". Default NOW.
typestringquick | short | optimal. Default optimal.
trafficboolUse live traffic (PL only). Default true.
descboolReturn manoeuvre list. Default false.
onlyLengthAndETAboolReturn only length and ETA.
avoidTollsboolAvoid toll roads.
avoidFerriesboolAvoid ferries.
avoidHighwaysboolAvoid motorways/expressways.
calculateTollsboolCompute road tolls.
vehicleCatForETollintegerE-Toll vehicle category 1–5 (PL only, requires calculateTolls).
objectobject ОБЯЗАТЕЛЬНОVehicle configuration.
typestringcar | truck | (R) taxi | (R) privileged | (R) bike | (R) walk.
truckParamsobjectTruck dimensions (when type == "truck").
axleLoaddoubleAxle load (tonnes, ±0.5).
truckWeightdoubleGross weight (tonnes, ±0.5).
truckLengthdoubleLength (m, ±0.5).
truckWidthdoubleWidth (m, ±0.5).
truckHeightdoubleHeight (m, ±0.5).
euroNormForTollintegerEuro emission norm 1–6 (toll calculation).

Пример запроса

{
    "points": [
        [
            20.6350676,
            52.1044404
        ],
        [
            20.8102593,
            52.0933647
        ],
        [
            21.0230905,
            52.2318032
        ]
    ],
    "route": {
        "calculateTolls": true,
        "vehicleCatForEToll": 2,
        "start": "NOW",
        "type": "short",
        "traffic": false,
        "desc": true,
        "avoidTolls": false,
        "avoidFerries": false,
        "avoidHighways": false
    },
    "object": {
        "type": "truck",
        "truckParams": {
            "axleLoad": 2.1,
            "truckWeight": 3.5,
            "truckLength": 7.2,
            "truckWidth": 2.5,
            "truckHeight": 3.4,
            "euroNormForToll": 5
        }
    }
}

Пример ответа

{
    "result": {
        "length": 37640,
        "eta": 60,
        "routePoints": [
            [
                20.6350445,
                52.1044257
            ],
            [
                20.6382422,
                52.1024025
            ],
            [
                21.0228726,
                52.2318902
            ]
        ],
        "desc": [
            {
                "location": "Książenice",
                "road": "Mazowiecka",
                "roadType": "city_main",
                "distance": 5862,
                "eta": 10,
                "routePoint": [
                    20.7018437,
                    52.073707
                ],
                "maneuver": "Roundabout"
            },
            {
                "location": "Warszawa",
                "road": "",
                "roadType": "internal",
                "distance": 22,
                "eta": 60,
                "routePoint": [
                    21.022875,
                    52.2318984
                ]
            }
        ],
        "mapurl": "https://mapa.targeo.pl/trasa_api,1652773689.6283533948f568.51828173"
    }
}

поля result

поля resultТипОписание
lengthintegerTotal length in metres.
etaintegerPredicted travel time in minutes (only when route.desc=true).
mapurlstringLink to the rendered route on the map.
routePointsdouble[][]Polyline of the route as [x, y] points.
desc[].locationstringManoeuvre location label.
desc[].roadstringRoad / street name.
desc[].roadTypestringSee roadType enum.
desc[].distanceintegerDistance from previous point (m).
desc[].etaintegerTravel time from the start to this point (min).
desc[].maneuverstringManoeuvre description.
desc[].routePointnumber[]Координаты [longitude, latitude] (WGS84), если доступны. Массив desc может отсутствовать.
tolls.systemsobjectPer-operator toll totals.