Google reccomends:
Lowering usage, by optimizing applications to use the web services more efficiently.
Increasing usage limits, when possible, by purchasing additional allowance for your Google Maps API for Work license.
Also HERE there is some workaround that seems to fit what you need in
if status == "OVER_QUERY_LIMIT":
time.sleep(2)
This is written in Phyton, but you can use it as Pseudocode, it's easily readable:
url = "MAPS_API_WEBSERVICE_URL"
attempts = 0
success = False
while success != True and attempts < 3:
raw_result = urllib.urlopen(url).read()
attempts += 1
# The GetStatus function parses the answer and returns the status code
# This function is out of the scope of this example (you can use a SDK).
status = GetStatus(raw_result)
if status == "OVER_QUERY_LIMIT":
time.sleep(2)
# retry
continue
success = True
if attempts == 3:
# send an alert as this means that the daily limit has been reached
print "Daily limit has been reached"
In your javascript
code, simply set a timeout:
if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT)
{
setTimeout(3000);
}
Check the working fiddle