title: Change position of Direction Render when drag Marker
body: <p>I have a project that save waypoints on the database according with the Marker position, I want to use custom icons on this markers so I supressed the Route Markers (the green markers)</p>
  
  <p>But if I move the marker to another point it will not change the render line according with the marker position, I want to "update" this renderer when I change my marker position.</p>
  
  <p><a href="http://www.inventoresdegaragem.com/dbteste/indexRotasTeste002.htm" rel="nofollow">This is the link to my project with the original version</a>
  Here is my code: (Edited with my try)</p>
  
  <pre><code>var map, ren, ser;
  var data = {};
  var data2 = {};
  var marker;
  var infowindow;
  var directionsDisplay;
  
  var wayA = [];
  var wayB = [];
  var directionResult = [];
  
  function goma()
  {
      var mapDiv = document.getElementById('mappy');   
      var mapOptions = {
      zoom: 12,       
      center: new google.maps.LatLng(-23.563594, -46.654239),
      mapTypeId : google.maps.MapTypeId.ROADMAP
      }
      map = new google.maps.Map( mapDiv, mapOptions );
  
      google.maps.event.addListener(map, "click", function(event) {
          if (wayA.length == wayB.length) {
          wayA.push(new google.maps.Marker({
        draggable: true,      
            position: event.latLng,
            map: map        
          }));
          } else {
          wayB.push(new google.maps.Marker({
        draggable: true,  
            position: event.latLng,
            map: map  
          }));  
  
  ren = new google.maps.DirectionsRenderer( {'draggable':true, suppressMarkers : true}  );
      ren.setMap(map);
      ren.setPanel(document.getElementById("directionsPanel"));
      ser = new google.maps.DirectionsService();
  
      ser.route({ 'origin': wayA[wayA.length-1].getPosition(), 'destination':  wayB[wayB.length-1].getPosition(), 'travelMode': google.maps.DirectionsTravelMode.DRIVING},function(res,sts) {
          if(sts=='OK') {
                      directionResult.push(res);
                      ren.setDirections(res); 
  
                  } else {
                      directionResult.push(null);
                  }
          });     
      }
   });
  }  
  </code></pre>