title: hiding the last direction marker with Google maps api
body: <p>I've calculated a route with the same begin and end point with the maps api.</p>
  
  <p>Because the begin and end point are the same, the first marker is overlapped by the last marker. Now I want only the last marker removed.</p>
  
  <p>I only know how to hide them all with:</p>
  
  <pre><code>directionsDisplay.suppressMarkers = true;
  </code></pre>
  
  <p>Is there a way to loop through the markers and remove the last one?</p>
  
  <p>this is the code I use for the directions:</p>
  
  <pre><code>function calcRoute(waypts) {
      var start = waypts[0].location;
      var end = waypts[0].location;
  
  
         var request = {
          origin:start,
          destination:end,
          waypoints:waypts,
          optimizeWaypoints: true,
          provideRouteAlternatives:false,
          travelMode:google.maps.TravelMode.DRIVING
         };
  
  directionsService.route(request, function(response, status) {
      if (status == google.maps.DirectionsStatus.OK) {
  
             directionsDisplay.suppressInfoWindows = true;
             directionsDisplay.suppressMarkers = true;
             directionsDisplay.setDirections(response);
  
             console.log(status);
  
      }else{
           alert('SATUS:'+response.status);
  
      }
   });
  }
  </code></pre>