Hi All

Why is this method I only get 5 addresses?

I ask how to use loop should get all the addresses?


-------------------------------------------------------------

 <script type="text/javascript">

var address = new Array();

  function LatLng()
  {
    address = new Array();
    var geoc=new google.maps.Geocoder();
    var k=0;
    var i=100;
    while(i>2)
    {
        var lat=rows[i].Lat;
        var lng=rows[i].Lng;
        var latlng=new google.maps.LatLng(lat,lng);
        if(geoc)
        {
            geoc.geocode(
            {'latLng':latlng},
            function(results,status)
            {

            if(status==google.maps.GeocoderStatus.OK)
            {

                address[k]=results[0].formatted_address;
                if(address[k]=='undefined')
                {
                    address[k]=results[1].formatted_address;
                }
                lbl.innerText= address[k];
                k++;
            }
            }
            );

        }
        i--;
    }
  }


------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to