如何捕获Google地图的OverQuotaMapError? [英] How to catch OverQuotaMapError for a Google map?
问题描述
如果我的JavaScript代码试图在一天内加载25,000次以上的Google地图API,Google会将OverQuotaMapError写入window.console。
请参阅 https://developers.google.com/maps/documentation / javascript / error-messages
OverQuotaMapError是window.console对象中的一个属性或值?
建议使用什么代码来查看这个'错误'是否发生了?
If my javascript code attempts to load the Google map API more then 25,000 times in a day then Google will write OverQuotaMapError to the window.console. See https://developers.google.com/maps/documentation/javascript/error-messages
我有一张可能会在今天晚些时候达到API负载限制的荒野火图。当发生这种情况时,我希望向我的用户显示一条信息性消息。
Is OverQuotaMapError a property or a value in the window.console object?
What is the recommended code to see if this ‘error’ has occurred?
如果您打开我发布的Google文档链接并滚动到底部,那么您将看到Google提供的建议链接,以便如何通过您的代码检查是否存在这些错误。
Silly me. If you open the google documentation link I posted and scroll to the bottom then you will see a link to advice from Google for how to check for any of these errors via your code.
这篇关于如何捕获Google地图的OverQuotaMapError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!