title: Hide marker from directions service in google maps api v3
body: <p>I'm using this service <a href="https://developers.google.com/maps/documentation/javascript/directions">https://developers.google.com/maps/documentation/javascript/directions</a> to create a route between two markers.</p>
  
  <p>The problem is that when I run the function to create the path, he enters me two markers by  default from google maps (the beginning and end) when I had created the markers with different style.</p>
  
  <p>Result: at each point have my marker and the marker's default google maps above.</p>
  
  <p>How can I hide the marker created by google?</p>
  
  <p>The code I'm using is:</p>
  
  <pre><code>function makePathToMarker(position1, position2) {
      var request = {
          origin: new google.maps.LatLng(myLocation.split(",")[0],myLocation.split(",")[1]),
          destination: new google.maps.LatLng(position1, position2),
          travelMode: google.maps.DirectionsTravelMode.DRIVING
      };
  
      var directionsService = new google.maps.DirectionsService();
  
      directionsService.route(request, function(response, status) {
          if (status == google.maps.DirectionsStatus.OK) {
              directionsDisplay.setDirections(response);
          }
      });
  }
  </code></pre>