title: Google Maps v3 parse through all markers to get the latitude and longitude of each
body: <p>All my markers are placed in the array "markersArray[]". I want to parse through them and retrieve their current individual latitude and longitude so I can add them to a string I then pass to PHP. Here are all the ways I've tried with no luck (getting latitude only for testing purposes).</p>
  
  <pre><code>function test() {
  alert("markersArray.length " + markersArray.length) 
      for( var i = 0, n = markersArray.length; i &lt; n; ++i ) {
          var markerLat = parseFloat(markersArray[i].getAttribute("lng")) 
          //var markerLat = map.markersArray[i].getPoint().lat();
          //var markerLat = map.markersArray[i].getPoint().lat();
          //var markerLat = map.markersArray[i].latLng.lat().toFixed(3);
          //var markerLat = map.markersArray[i].position.lat();
          alert("markerLat " + markerLat)             
      }
  }
  </code></pre>
  
  <p>I have no problem getting other attributes of the markers, I don't understand why this should be so difficult. :(</p>