You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for opposite approach request parameter (#6842)
* Added approach on the opposite side of the road.
* Additional test and docs coverage for opposite approach
---------
Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
Copy file name to clipboardExpand all lines: docs/http.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ To pass parameters to each location some options support an array-like encoding:
35
35
|radiuses |`{radius};{radius}[;{radius} ...]`|Limits the search to given radius in meters. |
36
36
|generate\_hints |`true` (default), `false`|Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. |
37
37
|hints |`{hint};{hint}[;{hint} ...]`|Hint from previous request to derive position in street network. |
38
-
|approaches |`{approach};{approach}[;{approach} ...]`|Keep waypoints on curbside. |
38
+
|approaches |`{approach};{approach}[;{approach} ...]`|Restrict the direction on the road network at a waypoint, relative to the input coordinate.|
39
39
|exclude |`{class}[,{class}]`|Additive list of classes to avoid, the order does not matter. |
40
40
|snapping |`default` (default), `any`|Default snapping avoids is_startpoint (see profile) edges, `any` will snap to any edge in the graph |
41
41
|skip_waypoints |`true`, `false` (default) |Removes waypoints from the response. Waypoints are still calculated, but not serialized. Could be useful in case you are interested in some other part of the response and do not want to transfer waste data. |
@@ -47,7 +47,7 @@ Where the elements follow the following format:
Copy file name to clipboardExpand all lines: docs/nodejs/api.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Returns the fastest route between two or more coordinates while visiting the way
63
63
-`options.geometries`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
64
64
-`options.overview`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
65
65
-`options.continue_straight`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
66
-
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Keep waypoints on curb side. Can be `null` (unrestricted, default)or `curb`.
66
+
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb`or `opposite`.
67
67
`null`/`true`/`false`
68
68
-`options.waypoints`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index.
69
69
-`options.format`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers).
@@ -101,7 +101,7 @@ Note: `coordinates` in the general options only supports a single `{longitude},{
101
101
-`options.generate_hints`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
102
102
-`options.number`**[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of nearest segments that should be returned.
103
103
Must be an integer greater than or equal to `1`. (optional, default `1`)
104
-
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Keep waypoints on curb side. Can be `null` (unrestricted, default)or `curb`.
104
+
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb`or `opposite`.
105
105
-`options.format`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers).
106
106
-`options.snapping`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
-`options.sources`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use
142
142
location with given index as source. Default is to use all.
143
143
-`options.destinations`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use location with given index as destination. Default is to use all.
144
-
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Keep waypoints on curb side. Can be `null` (unrestricted, default)or `curb`.
144
+
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Restrict the direction on the road network at a waypoint, relative to the input coordinate.. Can be `null` (unrestricted, default), `curb`or `opposite`.
145
145
-`options.fallback_speed`**[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Replace `null` responses in result with as-the-crow-flies estimates based on `fallback_speed`. Value is in metres/second.
146
146
-`options.fallback_coordinate`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Either `input` (default) or `snapped`. If using a `fallback_speed`, use either the user-supplied coordinate (`input`), or the snapped coordinate (`snapped`) for calculating the as-the-crow-flies distance between two points.
147
147
-`options.scale_factor`**[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Multiply the table duration values in the table by this number for more controlled input into a route optimization solver.
@@ -298,7 +298,7 @@ Right now, the following combinations are possible:
298
298
-`options.roundtrip`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route is a roundtrip. (optional, default `true`)
299
299
-`options.source`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route starts at `any` or `first` coordinate. (optional, default `any`)
300
300
-`options.destination`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route ends at `any` or `last` coordinate. (optional, default `any`)
301
-
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Keep waypoints on curb side. Can be `null` (unrestricted, default)or `curb`.
301
+
-`options.approaches`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?**Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb`or `opposite`.
302
302
-`options.snapping`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
0 commit comments