Optimal map routing with Google Maps

后端 未结 5 2018
臣服心动
臣服心动 2021-01-31 05:49

Is there a way using the Google Maps API to get back an \"optimized\" route given a set of waypoints (in other words, a \"good-enough\" solution to the traveling salesman proble

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 06:08

    It always gives them in order.

    So I think you'd have to find the distance (or time) between each pair of points, one at a time, then solve the traveling salesman problem yourself. Maybe you could convince Google Maps to add that feature though. I guess what constitutes a "good enough" solution depends on what you're doing and how fast it needs to be.

提交回复
热议问题