使用Google地图的最佳地图路由 [英] Optimal map routing with Google Maps

查看:141
本文介绍了使用Google地图的最佳地图路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在给定一组路标的情况下(换句话说,旅行商问题的足够好的解决方案),有没有一种方法可以使用Google地图API获取优化路线,或者是否始终返回

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 problem), or does it always return the route with the points in the specified order?

推荐答案

它总是按顺序给他们。

所以我认为你必须一次一个地找出每对点之间的距离(或时间),然后自己解决旅行商问题。也许你可以说服Google地图添加该功能。我想什么是足够好的解决方案取决于你在做什么以及它需要多快。

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.

这篇关于使用Google地图的最佳地图路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆