How to create direction arrows for my polylines in Google Maps (V3)?
I have routes as 开发者_如何学GoGoogle Maps Polylines in my project (an example, http://rutasgdl.com/rutas/626-2 ) and I want to add direction arrows to the routes. I want something like this (sadly, it is for Google Maps V2) http://wtp2.appspot.com/ArrowLine.htm
Can you point me in the right direction in order to achieve this? Regards.
The Google Maps API now supports this natively (as of July 2012).
https://developers.google.com/maps/documentation/javascript/symbols#add_to_polyline
I found a blog entry by Pavel Zotov, where he describes a way to add arrows to a polyline. The trick is to extend google.maps.OverlayView.
http://yab.hot-line.su/javascript/polyline-with-arrows-in-google-maps-api-v3.html
(I don't know if I can reproduce the code here, so I only post a link to the blog entry.)
Here is the code from Bill Chadwick ported to v3
Enjoy!
https://docs.google.com/open?id=0B4WFC4iBvLilOHc1YTFnakFsdWM
精彩评论