Im very bad at pasting the code here so here is a complete running example: https://plnkr.co/edit/klOViMslWjBFy3KTq507?p=preview
<html>
<body>
<script>
function initMap() {
geocoder = new google.maps.Geocoder();
console.log('sending requests');
geocodeAddress(geocoder,0);
}
function geocodeAddress(geocoder,cnt) {
if(cnt==50){
console.log('ending sending 50 requests');
return ;
}
var address = 'USA';
console.log('sending request');
geocoder.geocode({'address': address}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
console.log('got response OK');
} else {
console.error('got response wrong',status);
}
});
setTimeout(function(){
geocodeAddress(geocoder,cnt+1);
},100);
}
</script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?china=false&v=3.20&libraries=weather,geometry,visualization&language=en&sensor=false&callback=initMap"></script>
</body>
</html>
Im sending request every 100ms, which means i send 10 requests/second which is the exact client limit. Yet still im getting OVER_LIMIT error.... Why?