Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
moving documentation files
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter committed Nov 22, 2015
1 parent 9a5683e commit c0de39d
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*~
site/
3 changes: 3 additions & 0 deletions css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.container .navbar-right {
display: none;
}
File renamed without changes.
24 changes: 12 additions & 12 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Or search [our public forum](https://discuss.graphhopper.com/c/directions-api).

Do not hesitate to share your client code with us!

## [Routing API](docs-routing.md)
## [Routing API](routing.md)

[![Routing Example](./img/routing-example.png)](./docs-routing.md)
[![Routing Example](./img/routing-example.png)](./routing.md)

The Routing API is documented [here](./docs-routing.md).
The Routing API is documented [here](./routing.md).

The endpoint is `https://graphhopper.com/api/[version]/route`

Expand All @@ -40,11 +40,11 @@ You get an example response via:

Where you need to replace the key with your own

## [Route Optimization API](./docs-route-optimization.md)
## [Route Optimization API](./route-optimization.md)

[![Vehicle Routing Example](./img/vrp-example.png)](./docs-route-optimization.md)
[![Vehicle Routing Example](./img/vrp-example.png)](./route-optimization.md)

The Route Optimization API is documented [here](./docs-route-optimization.md).
The Route Optimization API is documented [here](./route-optimization.md).

The endpoint is `https://graphhopper.com/api/[version]/vrp`

Expand All @@ -57,23 +57,23 @@ The Route Optimization API works in two steps

For more details also about the format of the `your-vrp-problem.json` file you can use one of [the examples](https://github.com/graphhopper/directions-api-js-client/tree/master/route-optimization-examples).

## [Matrix API](./docs-matrix.md)
## [Matrix API](./matrix.md)

[![Matrix Example](./img/matrix-example.png)](./docs-matrix.md)
[![Matrix Example](./img/matrix-example.png)](./matrix.md)

The Matrix API is documented [here](./docs-matrix.md)
The Matrix API is documented [here](./matrix.md)

The endpoint is `https://graphhopper.com/api/[version]/matrix`

You get an example response for a 3x3 matrix looks via:

`curl "https://graphhopper.com/api/1/matrix?point=49.932707%2C11.588051&point=50.241935%2C10.747375&point=50.118817%2C11.983337&type=json&vehicle=car&debug=true&out_array=weights&out_array=times&out_array=distances&key=[YOUR_KEY]"`

## [Geocoding API](./docs-geocoding.md)
## [Geocoding API](./geocoding.md)

[![Geocoding Example](./img/geocoding-example.png)](./docs-geocoding.md)
[![Geocoding Example](./img/geocoding-example.png)](./geocoding.md)

The Geocoding API is not yet production grade. Please help us improve it and give us feedback! See the documentation [here](./docs-geocoding.md).
The Geocoding API is not yet production grade. Please help us improve it and give us feedback! See the documentation [here](./geocoding.md).

The endpoint is `https://graphhopper.com/api/[version]/geocode`

Expand Down
1 change: 1 addition & 0 deletions js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('test')
2 changes: 1 addition & 1 deletion docs-matrix.md → matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ See the [clients](./index.md) section in the main document.

### Introduction

In the [Routing API](docs-routing.md) we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes being calculated but is a lot faster compared to NxM single requests. The most simple example is a pizza delivery service, delivering e.g. 4 pizzas. To find the fastest tour consisting of ALL locations one needs a two step process:
In the [Routing API](./routing.md) we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes being calculated but is a lot faster compared to NxM single requests. The most simple example is a pizza delivery service, delivering e.g. 4 pizzas. To find the fastest tour consisting of ALL locations one needs a two step process:

1. Find all distances (or times) between all locations using the Matrix API. For the 4 pizzas you'll need 4*4-4 routes: A-B, A-C, A-D, B-A, B-C, B-D, ... The routes A-A, B-B, C-C and D-D are 0 and therefor the "minus 4".
2. Optimize the **order** of the locations to find the overall best tour. I.e. calculate the total time for the tour "A-B-C-D", then "A-C-B-D" and so on. This can be done with an external software or our Route Optimization API.
Expand Down
17 changes: 11 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
site_name: GraphHopper
site_description: GraphHopper Directions API Documentation
docs_dir: .
site_favicon: https://graphhopper.com/favicon.ico
docs_dir: .
pages:
- Home: index.md
- Routing API: docs-routing.md
- Route Optimization API: docs-route-optimization.md
- Geocoding API: docs-geocoding.md
- Matrix API: docs-matrix.md
- Overview: index.md
- API parts:
- Routing API: routing.md
- Route Optimization API: route-optimization.md
- Geocoding API: geocoding.md
- Matrix API: matrix.md
- Vehicles: supported-vehicle-profiles.md
- FAQ: FAQ.md
extra_css:
- css/custom.css
extra_javascript:
- js/custom.js
theme: flatly
2 changes: 1 addition & 1 deletion docs-route-optimization.md → route-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Other clients can be relative easily created via [swagger-codegen](https://githu

The fastest way to understand the API is by looking at the [live examples](https://graphhopper.com/api/1/examples/#optimization) and playing around with the [route editor](#route-editor). Finally you should read this documentation with extensive examples described below.

If you just need an optimal reordering of the locations for one vehicle and without constraints like time windows, ie. solving a traveling salesman problem then you can also have a look into our [Routing API](./docs-routing.md) which supports `optimize=true`.
If you just need an optimal reordering of the locations for one vehicle and without constraints like time windows, ie. solving a traveling salesman problem then you can also have a look into our [Routing API](./routing.md) which supports `optimize=true`.

### Route Editor

Expand Down
2 changes: 1 addition & 1 deletion docs-routing.md → routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locale | en | The locale of the result. E.g. `pt_PT` for Portuguese or
instructions| true | If instruction should be calculated and returned
vehicle | car | The vehicle for which the route should be calculated. Other vehicles are foot, bike, mtb, racingbike, motorcycle, small_truck, bus and truck. See [here](./supported-vehicle-profiles.md) for the details.
elevation | false | If `true` a third dimension - the elevation - is included in the polyline or in the GeoJson. IMPORTANT: If enabled you have to use a modified version of the decoding method or set points_encoded to `false`. See the points_encoded attribute for more details. Additionally a request can fail if the vehicle does not support elevation. See the features object for every vehicle.
optimize | false | If `false` the order of the locations will be identical to the order of the point parameters. If you have more than 2 points you can set this optimize parameter to `true` and the points will be sorted regarding the minimum overall time - e.g. suiteable for sightseeing tours or salesman. Keep in mind that the location limit of the [Route Optimization API](docs-route-optimization.md) applies and the [credit costs](FAQ.md#what-is-one-credit) are higher! Note to all customers with a self-hosted license: this parameter is only available if your package includes the Route Optimization API.
optimize | false | If `false` the order of the locations will be identical to the order of the point parameters. If you have more than 2 points you can set this optimize parameter to `true` and the points will be sorted regarding the minimum overall time - e.g. suiteable for sightseeing tours or salesman. Keep in mind that the location limit of the [Route Optimization API](./route-optimization.md) applies and the [credit costs](FAQ.md#what-is-one-credit) are higher! Note to all customers with a self-hosted license: this parameter is only available if your package includes the Route Optimization API.
points_encoded | true | If `false` a GeoJson array in `point` is returned. If `true` the resulting route will be encoded leading to big bandwith reduction. You'll need a special handling for the decoding of this string on the client-side, see the Java or JavaScript code above. It is especially important to use our decoding methods if you set `elevation=true`!
debug | false | If true, the output will be formated.
calc_points | true | If the points for the route should be calculated at all. Sometimes only the distance and time is necessary.
Expand Down

0 comments on commit c0de39d

Please sign in to comment.