'One to many geo points order by route travel time
I got a tricky use case. We got a selection of custom interest points in our database. From a mobile app, a client should be able ask to get the list of point of interests, order by real travel time.
It's not a shortest path problème, it's really several possible points, and the client will choose by himself the point he prefers, depending of the travel time between his position and one of the destination. So the answer must be quick and can not be precalculated. We could have in the worst case, 50 to 100 points.
So i'm looking for an WEB API that can be called in France where I can send several route optimisation queries at once.
a json body could looks like this, with more points of course:
[
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point1 lat",
"lon": "point1 lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point2 lat",
"lon": "point2lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point3 lat",
"lon": "point3 lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point4 lat",
"lon": "point4 lon"
}
}
]
And then the response would send the route optimization information for each point.
Do you know any api that have this possibility, or any solution to manage this use case ?
Solution 1:[1]
I finally found a solution with some help. The distance Matrix API + a middle-ware will answer to my needs. https://developers.google.com/maps/documentation/distance-matrix/overview
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jaycreation |
