Define Waypoint on DirectionsRenderer Brand in Google Maps v3

In the Google Maps API v3, how can I get waypoint markers from the DirectionsRenderer to add click events to them (like the delete menu).

+5
source share
3 answers

While the best solution cannot be found here, this is the work I used. The basic idea is to place your own marker on top of the waypoints and associate the click event listener with your marker. I made jsfiddle demonstrating this idea.

This is definitely not perfect, but with a custom icon instead of the default marker, it may look natural.

+5
0

, , DOM . . :

I encoded the complete solution in java for gwt . It should be pretty simple to translate it into javascript.

0
source

All Articles