Skip to content

Tracking route progorod

API path: /tracking/route/progorod.

get

Get route points using Progorod router.

parameters

  • start – (location JSON object) start of route
  • end – (location JSON object) end of route
  • waypoints = [ ${location}, ... ] – (optional) list of transitional points.
  • point_limit – (optional. int. min=2) If specified, the returned route will be simplified to contain this number of points (or less).
  • minsize – (optional. double) smoothing parameter in conventional meters. Default: 5. Not recommended to set it less than distance between two neighbouring pixels on current zoom.
  • use_traffic – (optional. boolean) If it is false then use mode=optimal and use_traffic=0 else mode=comfort and use_traffic=1. Default: false.

Where location described in data types description section. Order of waypoints may be changed.

response

{
    "success": true,
    "distance": 2546, // (int) length in meters
    "time": 194,      // (int) duration in seconds
    "list": [ ${location}, ... ], // list of route points
    "key_points": [ ${key_point}, ... ] 
}

key_points is list of points corresponding to start point, waypoints and end point (in that sequence). If some of key points not found then they don't listed there. Where key_point is JSON object:

{
    "id": 123,        // (int) index in points 'list'
    "lat": 56.827,    // latitude
    "lng": 60.594296  // longitude
}

errors

  • 215 (External service error)
  • 218 (Malformed external service parameters) – Contains info about error:
    {
        "success": false,
        "status": {
            "code": 218,
            "description": "Malformed external service parameters"
        },
        "errors": [{
            "type": "malformed", // type of error. one of: "not_set", "malformed" and "isolated"
            "point": "start",    // error point. one of: "start", "end", "waypoint" and "all"
            "index": 3           // passed only for waypoint. index of bad point in waypoints array
        }]
    }
    

Last update: August 21, 2020