API can't recon location from geo coordinates

24 views
Skip to first unread message

Innokentiy Georgievskiy

unread,
Sep 20, 2018, 7:33:44 AM9/20/18
to openrouteservice.org
Hello,

Thank you very much for the api, great work!

I have an issue which i can't resolve on my own:

I'm doing POST call to:https://api.openrouteservice.org/matrix?api_key=<api_key>&profile=driving-car with next profile values: {'profile': 'driving-car', 'metrics': 'duration|distance', 'optimized': true, 'units': 'm', 'locations': [ [ 55.776573, 37.551785 ], [ 55.803729, 37.41334 ] ], 'sources': "0", 'destinations': "1"} 

From response i can see: "sources": [{"location": null}], most of other values, except "destination" are "null" as well.

I used to check these coordinates with maps.openrouteservice.org - and all works well, i changed "sources" to some other value, and all works well as well.

Please help, what i'm doing wrong?

Cheers,
Innokentiy

Timothy

unread,
Sep 20, 2018, 8:21:25 AM9/20/18
to openrouteservice.org
Greetings Innokentiy, please try and reverse the order of your coordinates and try again. Thank you, Tim

Innokentiy Georgievskiy

unread,
Sep 20, 2018, 10:13:56 AM9/20/18
to openrouteservice.org
Hi Tim,

Thank you for prompt reply!

I tried, but in this case this will be a different location ... somewhere in India: 37.551785, 55.776573 according to maps.openrouteservice.org 

Does it mean that by default maps.openrouteservice.org will recon coordinates as lat, long, and according to API manual i should use long, lat? Right?

Cheers,
Innokentiy

Timothy

unread,
Sep 21, 2018, 10:01:30 AM9/21/18
to openrouteservice.org
Hi Innokentiy,

that is absolutely correct.

Cheers, Tim

Innokentiy Georgievskiy

unread,
Sep 24, 2018, 9:06:02 AM9/24/18
to openrouteservice.org
Thanks a lot! All sorted and working well now!
Reply all
Reply to author
Forward
0 new messages