I’m working on google maps and I need to draw the shortest path to navigate and visit all markers selected by the user.
I make my algorithm to solve that but the solution takes a long time and many codding, I need to know If there is any API or method to solve that quickly.
If you are already using Google API, maybe consider using Google Directions API.
You can provide it with a start and end locations and up to 20+ locations and the API will calculate the best route.
You can find more info here.
Hope this helps.