Reformated the docs for annotations
This commit is contained in:
parent
280b000f07
commit
14797c421e
@ -1,8 +1,11 @@
|
|||||||
# 5.4.0
|
# 5.4.0
|
||||||
|
Changes from 5.3.0
|
||||||
- Profiles
|
- Profiles
|
||||||
- includes library guidance.lua that offers preliminary configuration on guidance.
|
- includes library guidance.lua that offers preliminary configuration on guidance.
|
||||||
- Guidance
|
- Guidance
|
||||||
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car)
|
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car)
|
||||||
|
- API:
|
||||||
|
- `annotations=true` now returns the data source id for each segment as `datasources`
|
||||||
|
|
||||||
# 5.3.0
|
# 5.3.0
|
||||||
Changes from 5.3.0-rc.3
|
Changes from 5.3.0-rc.3
|
||||||
|
32
docs/http.md
32
docs/http.md
@ -399,8 +399,8 @@ Represents a route between two waypoints.
|
|||||||
|
|
||||||
| annotations | |
|
| annotations | |
|
||||||
|--------------|-----------------------------------------------------------------------|
|
|--------------|-----------------------------------------------------------------------|
|
||||||
| true | returns distance and durations of each coordinate along the route |
|
| true | An `Annotation` object containing node ids, durations and distances |
|
||||||
| false | will not exist |
|
| false | `undefined` |
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
@ -420,16 +420,28 @@ With `steps=false` and `annotations=true`:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Annotation data
|
### Annotation
|
||||||
|
|
||||||
Several fields are available as annotations. They are:
|
Annotation of the whole route leg with fine-grained information about each segment or node id.
|
||||||
|
|
||||||
|
#### Properties
|
||||||
|
|
||||||
|
- `distance`: The distance, in metres, between each pair of coordinates
|
||||||
|
- `duration`: The duration between each pair of coordinates, in seconds
|
||||||
|
- `datasources`: The index of the datasource for the speed between each pair of coordinates. `0` is the default profile, other values are supplied via `--segment-speed-file` to `osrm-contract`
|
||||||
|
- `nodes`: The OSM node ID for each coordinate along the route, excluding the first/last user-supplied coordinates
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"distance": [5,5,10,5,5],
|
||||||
|
"duration": [15,15,40,15,15],
|
||||||
|
"datasources": [1,0,0,0,1],
|
||||||
|
"nodes": [49772551,49772552,49786799,49786800,49786801,49786802]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
| field | description |
|
|
||||||
|-------------|---------------------------------------------------------------------------------------------------------|
|
|
||||||
| distance | the distance, in metres, between each pair of coordinates |
|
|
||||||
| duration | the duration between each pair of coordinates, in seconds |
|
|
||||||
| datasources | the index of the datasource for the speed between each pair of coordinates. `0` is the default profile, other values are supplied via `--segment-speed-file` to `osrm-contract` |
|
|
||||||
| nodes | the OSM node ID for each coordinate along the route, excluding the first/last user-supplied coordinates |
|
|
||||||
|
|
||||||
### RouteStep
|
### RouteStep
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user