Answers.Body: <p>You weren't imagining things. CiviCRM 4.6 and 4.7 until recently was ignoring the Google API key altogether! I'm not sure the history of that, but it would have been great if someone had documented that in the settings. As of the latest 4.6 and 4.7 the Google API key is getting recognized again (<a href="https://github.com/civicrm/civicrm-core/blob/4.6.23/CRM/Utils/Geocode/Google.php" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/4.6.23/CRM/Utils/Geocode/Google.php</a>). Once I upgraded, I checked the URL getting passed and it now attaches the key and uses https (the other requirement of Google). And in the API dashboard I'm now seeing activity.</p>
  
  <p>So the answer to your question is: upgrade CiviCRM to the latest in order to get Geocoding to use your Google API key.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-01T13:38:15.037Z
Answers.LastActivityDate: 2016-12-01T13:38:15.037Z
Answers.UserDisplayName: herb
Body: <p>I'm getting a Geocoding over-limit error, even though I've enabled a billing profile with my Google Maps Geocoding API key. (I hope! :) )</p>
  
  <p>Using: Civi 4.6.14, Drupal 7.43, 
  Geocoding settings: 
  Mapping provided by Google, with my Google Maps Geocoding API key
  Geocoding provided by Google, with the same Google Geocoding API key, on a standard account.
  I have setup a billing profile with the key, so it should handle over-usage. 
  Scheduled job: geocoding=1, address parsing=1, throttle=1.</p>
  
  <p>The Scheduled job returns this error:</p>
  
  <blockquote>
    <p>Parameters parsed (and passed to API method):  a:4:
    {s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"1";s:8:"throttle";s:1:"1";}</p>
    
    <p>Full message:  Finished execution of Geocode and Parse Addresses with
    result: Failure, Error message: A fatal error was triggered: Aborting
    batch geocoding. Hit the over query limit on geocoder.</p>
  </blockquote>
  
  <p>Also, my Google developer's console shows no activity on my API key. </p>
  
  <p>So, I'm wondering if I have missed something in Civicrm... for instance I found this link: 
  <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Mapping+and+Geocoding" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Mapping+and+Geocoding</a>
  It says at the bottom:  </p>
  
  <blockquote>
    <p>Usage Limits Some providers have usage limits on their Mapping and
    Geocoding APIs. If you go over the limits you may receive a overlimit
    error when trying to save an address. Currently there is no support
    for integrating the Google APIs Console license (which is needed for
    sites whose usage is over limit). Contact info at civicrm dot org if
    you are interested in helping implement this.</p>
  </blockquote>
  
  <p>Does this mean that Civi can't handle over-billing?</p>
  
  <p>OR: perhaps I have not configured my Google API key properly. I think I've set it to only accept connections from our server's IP, and with our domains. </p>
  
  <p>Any ideas?</p>
  
  <p>I've subsequently followed the advice <a href="https://civicrm.stackexchange.com/questions/10322/geocoding-using-google-api">here</a> to switch mapping to Open Street Maps and Geocoding to Yahoo, and re-activated the Scheduled Job. That is currently running with no errors... :)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-20T07:52:08.943Z
Comments.Text: You may also be interested in: https://issues.civicrm.org/jira/browse/CRM-18150
Comments.UserDisplayName: John
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-20T10:11:35.317Z
Comments.Text: Whew! That's a cat amongst the pigeons... I guess this is something the core team will need to examine.
Comments.UserDisplayName: Andyg8
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-20T10:29:09.103Z
Comments.Text: However, it would be moderately disastrous for us to lose the proximity search functionality!
Comments.UserDisplayName: Andyg8
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-20T10:45:38.213Z
Comments.Text: There may be other geocoding providers with less strict terms of use, but we need to be certain ;]
Comments.UserDisplayName: John
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-21T01:27:22.083Z
Comments.Text: A possible solution to the proximity search issue... perhaps it would be possible to separate functions. Eg geocode and parse addresses for storage using non-google providers - eg Yahoo. And then do proximity lookups using Google?
Comments.UserDisplayName: Andyg8
Tags: <geocoding>
Title: How to get Geocoding to use my Google API key?
ThreadText: # How to get Geocoding to use my Google API key?
  
  (Asked by: username_0 on 2016-05-20)
  
  I'm getting a Geocoding over-limit error, even though I've enabled a billing profile with my Google Maps Geocoding API key. (I hope! :) )
  
  Using: Civi 4.6.14, Drupal 7.43,
  Geocoding settings:
  Mapping provided by Google, with my Google Maps Geocoding API key
  Geocoding provided by Google, with the same Google Geocoding API key, on a standard account.
  I have setup a billing profile with the key, so it should handle over-usage.
  Scheduled job: geocoding=1, address parsing=1, throttle=1.
  
  The Scheduled job returns this error:
  
  > Parameters parsed (and passed to API method): a:4:
  > {s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"1";s:8:"throttle";s:1:"1";}
  >
  > Full message: Finished execution of Geocode and Parse Addresses with
  > result: Failure, Error message: A fatal error was triggered: Aborting
  > batch geocoding. Hit the over query limit on geocoder.
  
  Also, my Google developer's console shows no activity on my API key.
  
  So, I'm wondering if I have missed something in Civicrm... for instance I found this link:
  <https://wiki.civicrm.org/confluence/display/CRMDOC/Mapping+and+Geocoding>
  It says at the bottom:
  
  > Usage Limits Some providers have usage limits on their Mapping and
  > Geocoding APIs. If you go over the limits you may receive a overlimit
  > error when trying to save an address. Currently there is no support
  > for integrating the Google APIs Console license (which is needed for
  > sites whose usage is over limit). Contact info at civicrm dot org if
  > you are interested in helping implement this.
  
  Does this mean that Civi can't handle over-billing?
  
  OR: perhaps I have not configured my Google API key properly. I think I've set it to only accept connections from our server's IP, and with our domains.
  
  Any ideas?
  
  I've subsequently followed the advice [here](https://civicrm.stackexchange.com/questions/10322/geocoding-using-google-api) to switch mapping to Open Street Maps and Geocoding to Yahoo, and re-activated the Scheduled Job. That is currently running with no errors... :)
  
  **Tags:** geocoding
  
  > **Comments:**
  > **username_1**: You may also be interested in: https://issues.civicrm.org/jira/browse/CRM-18150  
  > **username_0**: Whew! That's a cat amongst the pigeons... I guess this is something the core team will need to examine.  
  > **username_0**: However, it would be moderately disastrous for us to lose the proximity search functionality!  
  > **username_1**: There may be other geocoding providers with less strict terms of use, but we need to be certain ;]  
  > **username_0**: A possible solution to the proximity search issue... perhaps it would be possible to separate functions. Eg geocode and parse addresses for storage using non-google providers - eg Yahoo. And then do proximity lookups using Google?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-12-01. Score: 2
  
  You weren't imagining things. CiviCRM 4.6 and 4.7 until recently was ignoring the Google API key altogether! I'm not sure the history of that, but it would have been great if someone had documented that in the settings. As of the latest 4.6 and 4.7 the Google API key is getting recognized again (<https://github.com/civicrm/civicrm-core/blob/4.6.23/CRM/Utils/Geocode/Google.php>). Once I upgraded, I checked the URL getting passed and it now attaches the key and uses https (the other requirement of Google). And in the API dashboard I'm now seeing activity.
  
  So the answer to your question is: upgrade CiviCRM to the latest in order to get Geocoding to use your Google API key.
  
  
  ---
  
  