Search code examples
google-maps-api-3polyline

How to create direction arrows for my polylines in Google Maps (V3)?


I have routes as Google 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.


Solution

  • 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.)