title: jquery and google maps v3 dragstart and dragend
body: <p>I am creating an array of markers and attaching functionality to dragstart and dragend. I finally got it to work with a simple change, but cannot understand why the original code I created does not work.</p>
  
  <p>For each marker the following code runs:</p>
  
  <pre><code>google.maps.event.addListener(marker, 'dragstart', function(evt){
      GLOBAL.startDragPosition = this.getPosition();
  });
  
  google.maps.event.addListener(marker, 'dragend', function(evt){
      if (confirm("Are You Sure You Want To Move this marker NOW ??")) {
          //do something here ...
      } else {
          marker.setPosition(GLOBAL.startDragPosition);
          delete GLOBAL.startDragPosition;            
      }
  });
  </code></pre>
  
  <p>If I cancel the move, a different marker moves back to the original location. If I change the else statement to the following it works -</p>
  
  <pre><code>    } else {
          this.setPosition(GLOBAL.startDragPosition);
          delete GLOBAL.startDragPosition;            
      }
  </code></pre>
  
  <p>Can anyone tell me why the "marker." notation is not referring to the marker being dragged?</p>
  
  <p>TIA!!</p>