title: Google Map Geocoded TypeError in Callback function
body: <p>I have the following 2 functions to pull in, geocode, and place markers in a google map.</p>
  
  <p>I keep getting a <code>TypeError: adds[i] is undefined</code>, which of course is causing the rest of the map to bomb.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>// Place Markers on the Map
  var PlaceMarkers = function (iw, adds, gc) {
      var image = {url: "http://meatmysite.com/Images/star2.png", size: new google.maps.Size(24, 24)};
      var aCt = adds.length;
      for(var i = 0; i &lt; aCt; ++i) {
          GetLatLng(gc, adds[i].address, function(pos) {
              if(pos) {
                  var ipop = '&lt;h1&gt;' + adds[i].title + '&lt;/h1&gt;'; // &lt;-----   TypeError: adds[i] is undefined
                  if(!isBlank(adds[i].url)){
                      ipop += '&lt;a href="' + adds[i].url + '" target="_blank"&gt;' + adds[i].url + '&lt;/a&gt;&lt;br /&gt;';
                  }
                  ipop += '&lt;div class="map_item_content" id="mi_content' + i + '"&gt;' + adds[i].content + '&lt;/div&gt;';
                  if(!isBlank(adds[i].mainphone)){
                      ipop += '&lt;br /&gt;&lt;strong&gt;Phone:&lt;/strong&gt; &lt;a href="tel:'+adds[i].mainphone+'"&gt;' + adds[i].mainphone + '&lt;/a&gt;';
                  }
                  if(!isBlank(adds[i].mainemail)){
                      ipop += '&lt;br /&gt;&lt;strong&gt;Email:&lt;/strong&gt; &lt;a href="mailto:'+adds[i].mainemail+'"&gt;' + adds[i].mainemail + '&lt;/a&gt;';
                  }
                  console.log('HEY NOW: ' + pos.toString() + ' - Location Found!');
                  var mark = new google.maps.Marker({title: adds[i].title, position: pos, map: map, icon: image, html: ipop});            
                  google.maps.event.addListener(mark, 'click', function(){
                      iw.setContent(this.html);
                      iw.open(map, this);
                  });
              }
          });
      }
  };
  // Get Lat/Lng Location
  var GetLatLng = function(gc, add, f) {
      var ret = '';
      gc.geocode({'address': add}, function(res, status) {
          if (status == 'OK') {
              f(res[0].geometry.location);
              console.log('Found Here: ' + ret.toString());
          }
      });
      return -1;
  };
  </code></pre>
  
  <p><strong>DEMO RETURNED DATA FOR adds</strong></p>
  
  <pre><code>[
  {
      "address": "1 My Street Gilbert, AZ 85234",
      "title": "My Title 1",
      "url": "http://www.myurl.com/",
      "mainphone": null,
      "mainemail": null,
      "content": "1 My Street&lt;br /&gt;Gilbert, AZ 85234"
  },
  {
      "address": "2 My Street North Richland Hills, TX 76182",
      "title": "My Title 2",
      "url": null,
      "mainphone": null,
      "mainemail": null,
      "content": "2 My Street&lt;br /&gt;North Richland Hills, TX 76182"
  }
  ]
  </code></pre>