How to remove default A B markers on google maps route direction
directionsDisplay.setOptions({
polylineOptions: {
strokeWeight: 4,
strokeOpacity: 1,
strokeColor: 'red'
}
});
Try using the suppressMarkers option on the DirectionsRenderer to prevent the markers on the route from being displayed. This should leave the markers that you have added directly to the map in place but not show those associated with the route.
directionsDisplay.setMap(map);
directionsDisplay.setOptions( { suppressMarkers: true } );