The last topic for this was around 2018 and I was curious if there was a simple method to get road surface information via the path or Instructions.
The following suggests that it is possible;
I have setup a custom model with the vehicle set as car. This might be what’s causing the issue…
I have set the following hints;
I get the best route.
I output the instructions to see what’s happening with them;
[(0,Elsie Morton Place,211.15076130108702,25338), (-2,Dominion Road,62.121,4970), (2,,68.593,12347), (4,,0.0,0)]
Am I missing something simple?
List<String> details = new ArrayList();
new GHRequest(flat, flon, tlat, tlon).setPathDetails(details);
This then gives road_class details from System.out.println(path.getPathDetails());
Optional parameter to retrieve path details. You can request additional details for the route:
Yes, you can do the same with “surface”. You just answered your own question, didn’t you?
Yes, I got stuck but then revisited it a few hours later and it just sort of clicked.
Figured I would answer my own question instead of removing it just in case someone searches for a similar thing.