graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.

Home Page:https://www.graphhopper.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Route: Legs information empty in Java API

jurmous opened this issue · comments

Describe the bug
When requesting a route with multiple stops, legs is empty within ResponsePath of GHResponse.

Note: in ResponsePath code it seems legs is a private field which besides getter is never touched.

To Reproduce

Steps to reproduce the behavior. For examples:

  1. Request a route with multiple stops
  2. Get best route and query legs. Legs is always empty even though LEG_DISTANCE and LEG_TIME were passed as path details

Expected behavior
Legs array would be filled with also leg distance and leg time

System Information

macOS 14.4.0. JVM OpenJDK 17.0.6, GraphHopper 9.0|2023-11-22T16:43:43Z (9,21,6,5,2,9)

Screenshots & Logs
Scherm­afbeelding 2024-03-26 om 11 49 57