Hi, I am also playing a bit with alternative routes.
I have modified a bit
public List calcPaths(GHRequest request, GHResponse ghRsp)
in GraphHopper.java, so that several paths are contained in the returned altPath.
However, they are not shown on localhost server. I would like them to be displayed as alternative routes (being able to click on the icons switching between them)
Note that these paths are computed using CH.
What should be modified/corrected/taken care of?
If the JSON response contains them then you should see them like here.
Thank you, yes, this looks like what I am trying to get.
Apologize for the stupid question - where exactly can I check if JSON response contains it?
In calcPaths, right before return there are 3 paths inside altPaths…
If GHResponse has the correct List of PathWrappers it should work. See AlternativeRoutingTemplate