brother
brother

Reputation: 8151

Querying Google maps too fast?

I have about 100 adress that i plot onto a Google maps using the JS API. I found that only the first around 20 gets loaded, with the rest i get an error from Google's API. After some debug i figured out that i was querying to many to fast.

So my question is; how would i, using js/jQuery, load 20 at a time, set a timeout of 1 or 2 seconds, then load 20 more, and repeat until there is no more results left?

Upvotes: 0

Views: 80

Answers (1)

Philippe Boissonneault
Philippe Boissonneault

Reputation: 3949

Maybe setTimeout should work, if I recall, Gmaps limits to 20 query / minutes.

setTimeout('get20More', 60000);

But you should always keep this data in your database for further uses, so you don't query Gmaps for nothing.

Upvotes: 1

Related Questions