Hello everyone!!!

I have a list of points with informations like latitude, longitude,
altitude, speed and satellite counter.
Then I update that list getting locations of each latitude and
longitude in a cycle represented by this code:

var id_address = 1, first_id_address = 0, increment = -1;

function getTableAddresses(id_event, last_id_event, incr) {
  id_address = last_id_event;
  increment = incr;
  if (mArray[id_address] != null &&
myGetElementById("div_row_address"+id_address) != null)
  {
    first_id_address = id_event;
    //sleep(2000);    // to slow event so I can get the address
    geocoder.getLocations(getLatLonMarker(mArray[id_address]),
showTableAddress);
  }
  else
    showTableAddress(null);
}

function showTableAddress(response) {
    if (myGetElementById("div_row_address"+id_address) != null &&
response != null)
    {
        if (!response || response.Status.code != 200) {
            myGetElementById("div_row_address"+id_address).innerHTML =
"Address not found";
        } else {
            myGetElementById("div_row_address"+id_address).innerHTML =
response.Placemark[0].address;
        }
    }
    if ((increment < 0 && id_address > first_id_address) || (increment
> 0 && id_address < first_id_address))
    {
        id_address = id_address + increment;
        getTableAddresses(first_id_address, id_address, increment);
    }
}

and if I don't slow the event I get plenty of "address not
found" (response.Status.code = 620) ... Instead slowing the code with
a sleep(2000); I get all addresses. The bad thing is if I have like
2000-5000 points that correspond a path in the map that would be
really sooooo slow to complete....

I know API v2 is deprecated but maybe someone has a clue about solving
it? Or maybe API's function getLocation() has been modified lately?...

Or even again, shall I have to move to API v3 to solve that issue?...

Thanks in advance to everyone!

Bye
Luigi

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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-api?hl=en.

Reply via email to