Google地图连接标记 [英] Google maps connecting markers

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

问题描述

我的数据库中有数百个GPS坐标(由我车里的GPS模块采集),我将它们加载到谷歌地图中。有什么方法可以像谷歌航点一样连接这些坐标(所以连线总是停留在路上)? 您可能想要使用 Google Directions Web Service API。您可以使用PHP或Python之类的方式在每个点之间进行调用,然后在服务器上缓存指令。然后在您的地图上将它们作为多段线提供。或者,您可以在浏览器中使用路线服务


I have hundreds of GPS coordinates (collected by a GPS module in my car) in my database and I am loading them to google maps. Is there some way I can connect these coordinates in same way as google waypoints do (so the connecting line always stays on a road)?

解决方案

You would probably want to use the Google Directions Web Service API. You would use something like PHP or Python to do a call between each of the points and then cache the directions on your server. Then serve them out as Polylines on your map. Or you could do it client side, in the browser, using the Directions Service.

这篇关于Google地图连接标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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