Hello,
I have installed and started the service successfully. I tried using distance matrix API with your free server (
openrouteservice.org) with a post request and I was able to get distances correctly.
Here is how my post request looks like
POST myIP:8080/ors/matrix/api_key=myApiKey
Post body
{"profile":"driving-car","metrics":"duration|distance","optimized":true,"units":"m","locations":[[-0.80966,52.10322000000001],[-0.7490300000000001,52.082910000000005],[-0.7479600000000001,52.08370000000001],[-0.128012,51.507309]],"sources":[3],"destinations":[0,1,2]}
Response
{
"distances": [
[
null,
null,
null
]
],
"durations": [
[
null,
null,
null
]
],
"destinations": [
{
"location": null
},
{
"location": null
},
{
"location": null
}
],
"sources": [
{
"location": null
}
],
"info": {
"service": "matrix",
"engine": {
"version": "4.7.0",
"build_date": "2018-10-10T12:47:57Z"
},
"timestamp": 1539338796042,
"query": {
"profile": "driving-car",
"units": "m"
}
}
}
{
"distances": [
[
96859.23,
86070.08,
117195.7
]
],
"durations": [
[
4667.33,
4108.1,
5290.58
]
],
"destinations": [
{
"location": [
-0.812737,
52.105168
],
"snapped_distance": 301.82
},
{
"location": [
-0.749026,
52.082887
],
"snapped_distance": 2.62
},
{
"location": [
-0.747938,
52.083712
],
"snapped_distance": 2.01
}
],
"sources": [
{
"location": [
-0.128017,
51.507309
],
"snapped_distance": 0.37
}
],
"info": {
"service": "matrix",
"engine": {
"version": "4.7.0",
"build_date": "2018-10-05T10:45:12Z"
},
"timestamp": 1539339495473,
"query": {
"profile": "driving-car",
"units": "m"
}
}
}
I would like to provide some details about what I have done
) vers
* Cloned and installed the latest (4.70) version of the service using Docker
* Downloaded latest United Kingdom OSM file under docker/data directory (Also copied under openrouteservice/src/main/files just in case)
* Modified app config to reference that file instead of the provided sample
The points on request body are all inside United Kingdom. Could you please offer any additional help in terms of configuration, data, etc so that I can finish my setup?
Many thanks