2011-04-02 13 views

Respuesta

4

Encontré una entrada en el blog de Pavel Zotov, donde describe una forma de agregar flechas a una polilínea. El truco es extender google.maps.OverlayView.

http://yab.hot-line.su/javascript/polyline-with-arrows-in-google-maps-api-v3.html

(no sé si puedo reproducir el código aquí, así que sólo enviar un enlace a la entrada del blog.)

+8

El blog anterior es ahora no disponible (error prohibido 403). Una fuente alternativa es: www.wolfpil.de/v3/arrow-heads.html (de nuevo, la licencia no está clara, así que no estoy seguro si puedo pasar el código). – Kevin

1

Aquí está el código de Bill Chadwick portado a V3

¡Disfrútalo!

https://docs.google.com/open?id=0B4WFC4iBvLilOHc1YTFnakFsdWM

+1

Pequeño fallo en el código: strokeColor: this.color, strokeOpacity: this.opacity, strokeWeight: this.weight, debe ser: strokeColor: this.headColor, strokeOpacity: this.headOpacity, strokeWeight: this.headWeight, –

Cuestiones relacionadas