Does anyone know a way to test via Javascript or a HTTP-Request, if the quota of Google Maps Javascript API V3 is reached? Getting the error-message, which is displayed for the user, would be sufficient.
We enabled billing and have a quota for Google Maps Javascript API v3 on around 100,000, but sometimes we break it and sometimes even do not realize it. Now we like to monitor our api access with a tool like nagios (perhaps by using phantomjs) to get an instant warning. But I could not find any information on how to test, if our quota has exceeded.
Update2
A similar request ist found here: How to detect that the 25000 request per day limit has been reached in Google Maps?
But there is only a reference to the API-Console. If someone managed to do a fallback to static maps using Javascript, I could modify the script for my case.
Update
Here is an example of the localized quota error-message by google maps, which appears for the user instead of a map. I would prefer to remove the maps container if something like this happens:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…