I am using google map v3 to do some address translation.
I pass the request and callback function to Geocoder.geocode. The callback function will add a marker on the map. After all, I use map.FitBounds(fullBounds) to make all makers in sight, where map being the Map obejct, fullBounds being LatLngBounds obejct.
below is piece of my code:
for(i = 0; i < requestArray.length; i ++)
{
geo.geocode(requestArray[i], calbck);
}
My problem is that when I invoke map.fitBounds(fullBounds) in calbck, not all callback functions have finished(always none in my observation). So how can I delay the fitBounds so that all callback functions have finished?