title: Google Maps marker position after dragged
body: <p>I may be missing some fundamental law in JavaScript here, quite possibly, but I have a question regarding the latlng position of a Google Maps marker after it is dragged.</p>
  
  <p>I am successfully adding markers to a map, and assigning those added markers to a variable, or to be more precise, I'm using jQuery to add those markers to the <code>data</code> of the map's div element, using <code>jQuery.data()</code>.</p>
  
  <p>Now, the problem I have arises when I drag those markers around the map. I understand the <code>dragend</code> event, and how to fire/capture it and it's data, including the new latlng position after the drag. That being said, I was of the understanding that objects in JavaScript are passed by reference, so what I can't understand is why the position of the marker reference stored in the element isn't updated to reflect the new position automatically?</p>
  
  <p>I guess it could be one of the following:</p>
  
  <ol>
  <li>Objects passed into the <code>data</code> of an element are duplicated, not passed by reference, and therefore a jQuery problem.</li>
  <li>Google Maps doesn't automatically update the latlng positions of it's markers, stored in variables or <code>data</code> nodes, and therefore a Google Maps problem.</li>
  <li>I have to physically fire the <code>dragend</code> event myself to update the position (sounds like an odd solution).</li>
  </ol>
  
  <p>I'm basically querying this to see if I need to log it as an issue anywhere, or whether I'm just being an idiot. Any input from other hardened Google Mappers would really help me here.</p>
  
  <p>Cheers in advance.</p>