TSP in jsprit using lat lng coordinates

Hi everybody,
I’m trying to solve the TSP problem on my local server for vehicle navigation. My understanding is that I could use Jsprit for that.
However, when looking at the documentation, it seems like Jsprit only takes as input coordinates x and y and not the actual (LAT,LNG) coordinates to solve the TSP.
I’ve read that I should calculate the routing cost matrix elsewhere and feed that to Jsprit. Is my understanding correct? Are there any examples available where I can see this in action? How can I calculate the cost matrix using Graphhopper java code and feed that to jsprit?
It seems like there were some examples in the old documentation but they have been removed.
Thank you very much in advance