OVER_QUERY_LIMIT while using google maps

后端 未结 6 1336
陌清茗
陌清茗 2020-11-28 09:45

I have a problem while acessing google maps from my application, when i send more than 10 requests in loop from java script i get the exception as OVER_QUERY_LIMIT from geoc

6条回答
  •  生来不讨喜
    2020-11-28 10:29

    First read this article. https://developers.google.com/maps/premium/previous-licenses/articles/usage-limits

    If you are send many request in one second then use delay method.

    function sleep(milliSeconds) {
      var startTime = new Date().getTime();
      while (new Date().getTime() < startTime + milliSeconds);
    }
    

    call this method in your loop structure. sleep(2200);

提交回复
热议问题