Using the Google Geocoder v3, if I try to geocode 20 addresses, I get an OVER_QUERY_LIMIT unless I time them to be ~1 second apart, but then it takes 20 seconds before my markers are all placed.
Is there any other way to do it, other than storing the coordinates in advance?
1. Google Maps Geocoding. Google Maps has become everyone's favorite source for navigation, traffic, transit, and location information.
If you are getting the error OVER_QUERY_LIMIT when trying to geocode an address with Google set as geocoding provider, this means that you exceeded the Google Maps Platform web services usage limits by: sending too many requests per day or e.g. by. sending requests too fast, i.e. too many requests per second.
It's free as long as you credit them and you need fewer than 15000 lookups per day. You can pay if you need more.
No, there is not really any other way : if you have many locations and want to display them on a map, the best solution is to :
This is, of course, considering that you have a lot less creation/modification of locations than you have consultations of locations.
Yes, it means you'll have to do a bit more work when saving the locations -- but it also means :
You actually do not have to wait a full second for each request. I found that if I wait 200 miliseconds between each request I am able to avoid the OVER_QUERY_LIMIT response and the user experience is passable. With this solution you can load 20 items in 4 seconds.
$(items).each(function(i, item){ setTimeout(function(){ geoLocate("my address", function(myLatlng){ ... }); }, 200 * i); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With