title: Detect Google Maps API quota limit
body: <p>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.</p>
  
  <p>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.</p>
  
  <p><strong>Update2</strong></p>
  
  <p>A similar request ist found here: <a href="https://stackoverflow.com/questions/8665696/">How to detect that the 25000 request per day limit has been reached in Google Maps?</a></p>
  
  <p>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.</p>
  
  <p><strong>Update</strong></p>
  
  <p>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:</p>
  
  <p><img src="https://i.stack.imgur.com/KcMvh.png" alt="Example of localized quota message"></p>