title: google map api v3 : update rectangle bounds when the shape is dragged or resized
body: <p>I'm trying to draw a rectangle on google map api v3 using the draw tool. I want the user to be able to :</p>
  
  <ol>
  <li>get the rectangle bounds when the shape is complete.</li>
  <li>update the bounds when the rectangle is dragged or re-seized.</li>
  </ol>
  
  <p>The (1) worked fine but i need some help on (2).
  This is the code i used for (1) :</p>
  
  <pre><code> //----------on rectangle complete event
        google.maps.event.addDomListener(drawingManager, 'rectanglecomplete', function(rectangle) {
           //get the rectangle bounds
           document.getElementById("savedata").value =rectangle.getBounds();     
      //hide draw tool
      drawingManager.setOptions({
          drawingControl: false
              });
      //disable draw tool 
      drawingManager.setDrawingMode(null);
        });
  </code></pre>