I have a route plotted fine on using DirectionsRender but I cannot find out how to replace the generic Google markers with my own.
I know and use this in a normal Google Map situation but finding it difficult to do this with the directions markers for start and end.
Thanks for any advice, pointers or gentle mocking if this is a silly question :D
Michael
The DirectionRender
takes an option called markerOptions
. Quoting from the API docs:
All markers rendered by the DirectionsRenderer will use these options.
So, if you want to set the markers use MarkerImage (as philar has indicated).
Your other option is to pass suppressMarkers: true
to the DirectionRender
's options and then simply use your own markers.
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