flov / hitchlog-nextjs

A rewrite or the rails app hitchlog to next.js and rails-api
https://hitchlog-nextjs.vercel.app
5 stars 0 forks source link

New Trip countries not correct #2

Open flov opened 1 year ago

flov commented 1 year ago

When routing from Croatia to Serbia, it does not compute the countries Serbia and Macedonia, resulting in a wrong trip distance

flov commented 1 year ago

I just checked and wrote some tests for the failing cases like Serbia to Croatia or Istanbul to Zagreb. Unfortunately google maps directionService doesn't return any information about the countries your travelling through. I tried to come up with a solution, but I couldn't find one that makes sense yet.

prino commented 1 year ago

Distances will eventually all be incorrect due to changes of the road network. And there's simply the fact that some rides are not just A-to-B, but drivers may make detours past C, D, and E. If you limit yourself to trip-segments of not more than 10 rides, and allow the user to enter arrival and departure locations for all 10, you could get Google to show more accurate maps.

I still trace every individual ride with Google, saving both the long and short URLs, but going back to them every now and then, the original distances occasionally no longer make sense, especially in Poland where they're building new motorways like there is no tomorrow.

flov commented 1 year ago

that's not the issue here. The issue here is that google maps itself does not provide the country of the waipoint of the travelled distances. I can get it for the arrival and the departure point, but for the rest I have to look at the description of the waypoint and listen to a "Entering country" description.

flov commented 1 year ago

And in some routes, this Entering does not exist, resulting in wrong country distances