Contact us Login LIVE DEMO FREE TRIAL

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.
  • 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.
  • point_limit – (optional. int. min=2) If specified, the returned route will be simplified to contain this number of points (or less).

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

return:

{
    "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 (See ticket [ticket:1858 #1858] for details). 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
    }]
}

If you have more questions please contact our support team

Contacts

USA: +1 858 815 9045

Mexico: +52 334 1642158

UK: +44 808 1641499

Germany: +49 1573 5988250

Russia: +7 495 223 0427

Log in

Login

[clean-login]

CLOSE
Register

[clean-login-register]

CLOSE
Loading...