Open didix16 opened 8 years ago
Hi, Have you found a solution for your problem after 3-4 years?
Hi @hussein-khamis . I had to left the project i which I was working but I founded the algorithm that solves that problem. Is the https://en.wikipedia.org/wiki/Travelling_salesman_problem. I found a repository which uses javascript to solve the problem: https://github.com/lovasoa/salesman.js/ But there are a lot of implementations over Internet.
Hope this help you :)
The thing is I am using Angular haha, and though this would be perfect I only I could use latitude and longitude, since I have my own markers. Any idea how we could do that? It's super important haha.
Sorry I never used Angular. Anyway you can take the TSP algorithm and adapt it to angular :)
Hi! I saw your work about TSP. I'm working in a project made in nodejs which works with geolocation points ( a object like {latitude:x, longitude: y} andsearching a lot on how to make a optimal route starting from one point and return back , crossing some points, I saw your code.
I need a method that passing a start point {latitude:x, longitude:y} and array of points, returns a new point array ordered representing the route to travel with.
It's hard for me to understand the algorithm, so I'm wondering if you could write the method using your lib or help me to write it.
Thank you so much :)