To get a route with waypoints, use the gis_get_route_via_waypoints request:
POST https://routing-maps.wialon.com/hst-api.wialon.com/gis_get_route_via_waypoints //Params (should be encoded by application/x-www-form-urlencoded, colon-separation provided for readability): data = { "params": {}, "origin": { "lat": <double>, "lon": <double> }, "destination": { "lat": <double>, "lon": <double> }, "waypoints": [ { "lat": <double>, "lon": <double> } ], "flags": <int>, "optimizeParams": { "enable": <boolean>, "fixOrigin": <boolean>, "fixDestination": <boolean> } } search_provider = <text> gis_sid = <text> uid = <long> sid = <text>
Name | Description |
---|---|
data | Main routing parameters. |
origin | Coordinates of the starting point. |
lat | Latitude of the starting point. |
lon | Longitude of the starting point. |
destination | Coordinates of the destination point. |
lat | Latitude of the destination point. |
lon | Longitude of the destination point. |
waypoints | Array with coordinates of waypoints. |
lat | Latitude of the waypoint. |
lon | Longitude of the waypoint. |
flags | Flags to control route parameters (e.g., 2). |
optimizeParams | Route optimization settings. |
enable | Enable optimization (true/false). |
fixOrigin | Fix the starting point (true/false). |
fixDestination | Fix the destination point (true/false). |
search_provider | Search provider (e.g., “webgis”). |
gis_sid | GIS session identifier. |
uid | User ID. |
sid | User session identifier. |
{ "routes": [ { "start_location": { "lat": <double>, "lon": <double> }, "end_location": { "lat": <double>, "lon": <double> }, "points": <text>, "distance": { "text": <text>, "value": <double> }, "duration": { "text": <text>, "value": <int> } } ], "status": <text> }