Google Maps API 在距起点特定距离处沿路线显示图标 [英] Google Maps API Display icon along route at a specific distance from start

查看:17
本文介绍了Google Maps API 在距起点特定距离处沿路线显示图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want to display virtual progress on a Google map. I want to display a map with a route and on that route I want to display an icon at some distance (that will be computed based on data) from the start. That distance could change from moment to moment or day to day depending on the data related to the progress along the virtual route. For instance on a route from LA to NY, one day I may want to display an icon at 772 miles from the start. The distance along the route can be in units or as a percentage. I have seen the google.maps.IconSequence object, but can't see how to use that with DirectionsService.

解决方案

A couple of "mile marker/kilometer marker" examples and an animated marker:

这篇关于Google Maps API 在距起点特定距离处沿路线显示图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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