ok guys, i found the problem. it wasn't the function, it was the user
who misinterpreted the failure.
the function resolve the address correctly, but i tried to send to
much requests to the google server.
this solved my little problem:
GC.setCache(null);
window.setTimeout(geocodeAll, 50);
function geocodeAll() {
if (numGeocoded < plzlist.length) {
GC.getLocations(plzlist[numGeocoded], addressResolved);
}
}
function addressResolved(response) {
var delay = 0;
if (response.Status.code == 620) {
// Too fast, try again, with a small pause
delay = 25;
} else if (response.Status.code == 200) {
// Success; do something with the address.
place = response.Placemark[0].Point.coordinates;
point = new GLatLng(place[1], place[0]);
marker = new GMarker(point);
setMarkerText(marker, getHTML(numGeocoded));
map.addOverlay(marker);
if (numGeocoded < 1)
map.setCenter(new GLatLng(place[1],place[0]),
7);
numGeocoded += 1;
}
else {
alert('Could not find "'+address+ '" ' + reason);
}
// Move onto the next address; this skips bad addresses, too.
window.setTimeout(geocodeAll, delay);
}
thanks for your help! bye
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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
-~----------~----~----~----~------~----~------~--~---