I am currently using googles directions API, it works fine, and plots 8 waypoints onto my map with the route using this line of code:
directionsDisplay.setDirections(response);
However, each marks, when clicked, shows up an info window with the address of the waypoint. Is there a way to change the content of these infowindows?
Thanks in advance, James.
Use the {suppressInfoWindows: true} option to the DirectionsRenderer, add a click listener to the map to display what you want in an InfoWindow. You may want to use {suppressMarkers:true} and create your own Markers so you can attach the click listener to the marker.
Example with custom markers (more complicated than you need, but it shows how to create custom markers with infowindows)
Example with custom markers and a waypoint
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With