-1

I've to make a map with multiple directions but the API limit 10 directions by map. So how can I bypass this? Is there any paying way to increase the limits?

Thanks in advance

Splinteer
  • 1,126
  • 4
  • 13
  • 28

1 Answers1

0

So, Google limit to 10 request per second so when I get the OVER_QUERY_LIMIT error code. I wait 1 sec and I redo the request.

I've found this function:

function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}
Splinteer
  • 1,126
  • 4
  • 13
  • 28