I’ve created a custom map with around 150 markers. It only plots around 20 or so before it hits the geocode limit.
What can I incorporate into my code to avoid hitting the limit?
UPDATE:
How can I add a time delay to each request say 0.25seconds (or whatever the lowest I can get away with)?
I’ve tried a few different suggestions but I can’t seem to get them to work with my code so please could any examples use my code.
So instead of sending all the requests almost instantly in a for-loop, I thought it might be better that when a geocode returns a result, to send the next one. If the result coming back is a
OVER_QUERY_LIMIT, resend the request with an increase on the delay. I haven’t found the sweet spot timeout that produces the fewestOVER_QUERY_LIMIT‘s, but at least it will create all the markers (for valid addresses). It takes about 45 seconds or so to finish on my machine.