Suppress markers generated by directions.route on directionsLayer

3 posts / 0 new
Last post
G. Baglin
Suppress markers generated by directions.route on directionsLayer

How to suppress or hide markers (startMarker, endMarker, waypointMarkers) on directionsLayer and see only the route ribbon?

I previously used GoogleMaps :

directionsDisplay = new google.maps.DirectionsRenderer({ suppressMarkers: true, preserveViewport: true });

I have already clickable markers on the which are hidden by the markers generated.

Thanks for help

 

 

 


MQBrianCoakley
I used the Extending
I used the Extending DirectionsLayer sample here to create a 0x0 icon (iconSize: [0,0]) to hide the default icons.

Eleweb99272
I made a little dirty trick:

I made a little dirty trick: I made a callback with a little setInterval, so after the directions was called, it modifies the marker's style (the directions marker has "text-marker" style), setting its display to none (sorry my english).