Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是谷歌地图的新手。我想从一个地方到另一个地方的距离并将其绘制在地图上。
例如:Place1 和 Place2 距离 - xxx 公里(xx 英里)并将其绘制在地图上。
请看一看。
使用几何库computeDistanceBetween() 函数。如果您没有坐标,请使用地理编码器获取它们。
示例(基于文档中的示例)