title: GMap Api geocoder.getLatLng (address) function , Doesn't work good when call it within loop
body: <p>I'm trying this recursion function to find LatLng of 2088 diffrent addresses and replay me with only about 180 results . although all addresses are valid on google maps website .</p>
  
  <pre><code>function test(i)
           {
              if(i &gt;= jsArray.length){return;}
                 var geocoder = new GClientGeocoder(); 
               geocoder.getLatLng(jsArray[i], function (current) { 
                       return function(point) { 
                                       if (!point) {
  
                                      data.push("null");
                                      //nulls.push(myindex);
                                    } else {
  
                                      data.push(point);
  
                                      //alert("done");
                                    }
  
                                  test(i+1,jsArray);
                              } 
  
                          }(i));
  
  
                   } 
  
  
                  test(0);
  </code></pre>
  
  <hr>
  
  <p>i have developed this recursive function but it's need about 30 mins till get good results ,</p>
  
  <pre><code> function test2(i)
               {
                   geocoder.getLocations(jsArray[i], function (current) { 
                   return function(response) { 
                                   if (!response || response.Status.code != 200) {
                                  //alert(address + " not found");
                                   //test(i,jsArray);
                                  // data.push("null");
                                  //nulls.push(myindex);
                                  test2(i);
  
                                } else {
                                   var len = response.Placemark[0];
  
                                      point2 = new GLatLng(
                                        len.Point.coordinates[1],
                                        len.Point.coordinates[0]
                                      );  
                                  data[i] = point2;
                                }
                          }
                          }(i));
               } 
  
  
  
              for(i =0 ; i&lt;=jsArray.length; i++)
              {
                  if(i==jsArray.length){
                        alert(data.length);
                      ///  $("#maintable").show(100) ;                         
                      ///  $("#loading").hide(100) ;
  
                  }else{
                      test2(i);
                  }
  
              }
  </code></pre>
  
  <p>i still need   expert one to help me :) :D</p>