You can change the map binding for the DirectionsRenderer to “null” to remove the direction overlay
directionDisplay.setMap(null);
You can change the map binding for the DirectionsRenderer to “null” to remove the direction overlay
directionDisplay.setMap(null);