Skip to content

Commit

Permalink
docs(routing): document routing endpoint to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Jun 17, 2016
1 parent ed96278 commit ebc90a7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@ Anglo-Saxon Rad.
> ᚱ Ræið kveða rossom væsta;
> Reginn sló sværðet bæzta.
## API

### GET /v1/routing

* **string** `cords` - A to B coordinates on the format `x1,y1,x2,y2`
* **number** `sensitivity` - routing sensitivity / buffer (**default** `2000`)

Return the shortest path from coordinate A to coordinate B. Will return a
`GeometryCollection` if a route is found.

**Return**

```json
{
"type": "GeometryCollection",
"geometries": [{
"type": "LineString",
"coordinates": [...],
"properties": {
cost: 1510.05825002283
}
}]
}
```

**Route not found**

If the point A or B can not be found or a route between them could not be
found the routing will return a `LineString` between the two points.

```json
{
"type": "LineString",
"coordinates": [
[ 8.922786712646484, 61.5062387475475 ],
[ 8.97857666015625, 61.50984184413987 ]
]
}
```

## Production

```
Expand Down

0 comments on commit ebc90a7

Please sign in to comment.