From 261636febbf116ed0a2afa6de4505ebade8b8d25 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Wed, 16 Aug 2017 21:05:57 +0000 Subject: [PATCH] Add HTTP docs --- docs/http.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/http.md b/docs/http.md index 956ea8e7d..57810fbbb 100644 --- a/docs/http.md +++ b/docs/http.md @@ -31,6 +31,7 @@ To pass parameters to each location some options support an array like encoding: |generate\_hints |`true` (default), `false` |Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. | |hints |`{hint};{hint}[;{hint} ...]` |Hint from previous request to derive position in street network. | |approaches |`{approach};{approach}[;{approach} ...]` |Keep waypoints on curb side. | +|exclude |`{class}[,{class}]` |Additive list of classes to avoid, order does not matter. | Where the elements follow the following format: @@ -40,12 +41,13 @@ Where the elements follow the following format: |radius |`double >= 0` or `unlimited` (default) | |hint |Base64 `string` | |approach |`curb` or `unrestricted` (default) | +|class |A class name determined by the profile or `none`. | ``` {option}={element};{element}[;{element} ... ] ``` -The number of elements must match exactly the number of locations. If you don't want to pass a value but instead use the default you can pass an empty `element`. +The number of elements must match exactly the number of locations (except for `generate_hints` and `exclude`). If you don't want to pass a value but instead use the default you can pass an empty `element`. Example: 2nd location use the default value for `option`: @@ -59,6 +61,9 @@ Example: 2nd location use the default value for `option`: # Query on Berlin with three coordinates: curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false' +# Query on Berlin excluding the usage of motorways: +curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407?exclude=motorway' + # Using polyline: curl 'http://router.project-osrm.org/route/v1/driving/polyline(ofp_Ik_vpAilAyu@te@g`E)?overview=false' ```