var directionsService = new google.maps.DirectionsService();
var directionsDisplay = new google.maps.DirectionsRenderer();
var startMarker = new google.maps.Marker(
map = new google.maps.Map(document.getElementById("mapCanvas"), mapOptions);
directionsRenderer.setMap(map);
directionsRenderer.setOptions( { suppressMarkers: true } );
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 } );