Hello, at present, I have a requirement for the project I am doing again, which is to set up several route points between the starting point and the end point for route planning, but in the process of using it, there is an error, and the error is as follows:
Currently alternative routes work only with start and end point
Here’s how to use it:
GHPoint start = new GHPoint(31.783791,111.519988);
GHPoint tjd = new GHPoint(31.760744,111.449359);
GHPoint end = new GHPoint(31.797762,111.417322);
req.addPoint(start)
.addPoint(tjd)
.addPoint(end);
req.putHint(Parameters.CH.DISABLE, true);
The method I’m using now is:
GHRequest req = new GHRequest().setAlgorithm(Parameters.Algorithms.ALT_ROUTE
But when I get rid of this method, it’s okay …
why???
yes. i know.
If I want the recommended route for the waypoint, then I need to set the waypoint as the endpoint for planning, and then set the waypoint as the starting point for planning. However, if I only have one waypoint, it’s okay to say, but if there are two waypoints, it’s a combination of n * n * n. This is not what I want, so this setting is not allowed. Thank you for your help. Thank you very much