我在我的项目中有路线作为谷歌地图折线(例如,http://rutasgdl.com/rutas/626-2),我想向路线添加方向箭头。我想要这样的东西(遗憾的是,它适用于 Google Maps V2)http://wtp2.appspot.com/ArrowLine.htm
你能指出我正确的方向以实现这一目标吗?问候。
我在我的项目中有路线作为谷歌地图折线(例如,http://rutasgdl.com/rutas/626-2),我想向路线添加方向箭头。我想要这样的东西(遗憾的是,它适用于 Google Maps V2)http://wtp2.appspot.com/ArrowLine.htm
你能指出我正确的方向以实现这一目标吗?问候。
Google Maps API 现在本机支持此功能(截至 2012 年 7 月)。
https://developers.google.com/maps/documentation/javascript/symbols#add_to_polyline
我找到了 Pavel Zotov 的一篇博客文章,他在其中描述了一种向折线添加箭头的方法。诀窍是扩展 google.maps.OverlayView。
http://yab.hot-line.su/javascript/polyline-with-arrows-in-google-maps-api-v3.html
(不知道这里能不能复现代码,所以只贴博文的链接。)