Google地图连接标记 [英] Google maps connecting markers
问题描述
我的数据库中有数百个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屋!