'How to calculate the shortest route between a start coordinate and multiple destination coordinates
I'm working on my graduation thesis in Computer Science. I'm developing an application that locates the shortest route to some emergency services in the city where I live. I need to know if through the HERE API I can find the shortest route given a start point and VARIOUS destination points, basically, which of these destination points is the closest.
I know I can find the shortest route between a starting point and a destination point, but what about multiple destination possibilities? Would I have to make multiple requests?
So far I haven't found how to do this, other than making multiple requests for each target point I have.
Example: Given the user's location, there are 5 emergency services on the map, I need to know which of these 5 emergency services is closest and calculate the route to the closest one.
Solution 1:[1]
This is the travelling salesman use case.
You do not tell what platform you are using, but for the HERE SDK, multiple stopover Waypoint items along a Route can be ordered automatically by setting RouteOptions.optimizeWaypointsOrder. If set to true, the OfflineRoutingEngine will try to optimize the waypoints order to reach the destination faster or to make the route shorter - this depends on the desired setting in the provided RouteOptions.
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 | Nusatad |
