After testing this module, I've got the following error:


You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_

So it would be great, if the module can support adding the credentials such as API keys.

See:

- https://support.google.com/googleapi/answer/6158857?hl=en-GB
- https://support.google.com/googleapi/answer/6158862
- https://console.developers.google.com/apis/credentials

Comments

kenorb created an issue. See original summary.

kenorb’s picture

mariaioann’s picture

The problem applies to the 7.x-1.x-dev version too.

I have created the following patch for the 7.x version:

esdrasterrero’s picture

Updated 7.x-1.1 patch.

kenorb’s picture

Status: Active » Needs review
mariaioann’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)
StatusFileSize
new2.16 KB

Updated patch for 7.x-1.x with authors data and commit description.

mariaioann’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Patch (to be ported) » Needs review
flocondetoile’s picture

StatusFileSize
new2.83 KB

Here a patch for 8.x

flocondetoile’s picture

Status: Needs review » Needs work

Using the Google Geocodig API may require to use a different API key than the API filled for the javascript Maps API, because you can't add restrictions based on the HTTP Referer for the geocoding, but only restrictions based on the IP server.

API keys with referer restrictions cannot be used with this API.

A workaround could be to provide a custom $settings for geocoder_autocomplete which may then, if set, override the main google maps geocoder api key.

A patch follow

flocondetoile’s picture

Status: Needs work » Needs review
StatusFileSize
new3.38 KB

With this patch you can use an another api key, than the api key set on the geocoder module, to use it especially for geocoding. You can set the api key in the settings.php file of your Drupal project.

For example

// Geocoder autocomplete settings.
$settings['geocoder_autocomplete']['use_ssl'] = TRUE;
$settings['geocoder_autocomplete']['locale'] = 'fr';
$settings['geocoder_autocomplete']['apikey'] = 'YOUR_API_KEY_FOR_GEOCODING';
remyyyyy’s picture

@flocondetoile Thank you very much for your last patch with custom settings ! For me it's ok !

sanduhrs’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.